Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84793 - kbd compile breaks after package is checked into CVS, because CVS directory is present in data/* which cause install to fail
Summary: kbd compile breaks after package is checked into CVS, because CVS directory i...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-10 16:17 UTC by Josh Hunt
Modified: 2006-10-05 18:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Hunt 2005-03-10 16:17:32 UTC
( I'll preface this bug by saying a) I've never filed a bug with Gentoo before and b) I'm not sure if I should file this with Gentoo, or whoever maintains kbd )

Package version - kbd-1.12-r2
uname -a output - Linux mirror 2.6.9 #3 Thu Nov 11 00:47:21 GMT 2004 i686   GNU/Linux

There is an inherent flaw in the logic of the makefile of kbd in the data directory.  As part of building our OS, my company checks these packages into CVS to keep them in a central repository for all developers.  When kbd is checked into CVS, the CVS information is added to the package ( CVS directories in each subdirectory, etc ).  When this happens the Makefile in data/ has a for loop which it uses to install some files.  The problem is this for loop does not expect there to be a CVS directory present.  When there is the make fails.  Here is the entry in the data/Makefile:
"
for i in $(KEYMAPSUBDIRS); do \
                install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/$$i ;\
                install -m 644 $(KEYMAPDIR)_Z/$$i/* $(DATADIR)/$(KEYMAPDIR)/$$i ;\
        done
"

Of the 100 packages we use, this is the only package which I have come across that has this problem.  It seems as though the logic in the Makefile should be modified to take into account things like CVS being present.  The current workaround is to remove all CVS subdirectories.


Reproducible: Always
Steps to Reproduce:
1.  Fetch latest kbd package.
2.  Unpack it.
3.  Check the package into a CVS system.
4.  Check out the package into a new location.
5.  Attempt to run "ebuild ... compile"

Actual Results:  
Here's the output from "ebuild .../kbd compile":  (last few lines of it, up to
this point everything else worked fine)

msgfmt -o tr.gmo tr.po
make[1]: Leaving directory `/var/tmp/portage/gentoo/packages/kbd/work/kbd-1.12/po'
make[1]: Entering directory
`/var/tmp/portage/gentoo/packages/kbd/work/kbd-1.12/data'
cp -r keymaps keymaps_Z
cd keymaps_Z && gzip -f -9 */*.map */*/*.map
cp -r consolefonts consolefonts_Z
cp -r partialfonts partialfonts_Z
cd consolefonts_Z && gzip -f -9 * && gunzip ERRORS* README*
gzip: CVS is a directory -- ignored
make[1]: *** [consolefonts_Z] Error 2
make[1]: Leaving directory `/var/tmp/portage/gentoo/packages/kbd/work/kbd-1.12/data'
make: *** [all] Error 1
 
!!! ERROR: sys-apps/kbd-1.12-r2 failed.
!!! Function src_compile, Line 59, Exitcode 2
!!! (no error message)
 
!!!!!!!Package:kbd Failed


Expected Results:  
It should have compiled successfully.
Comment 1 Josh Hunt 2005-03-11 11:14:01 UTC
It looks like I did not assess this correctly at first.  The error is not just in the for loop, but also in the lines preceding it which use a wildcard -

data/Makefile -

        install -d -m 755 $(DATADIR)
        install -d -m 755 $(DATADIR)/$(FONTDIR)
        install -m 644 $(FONTDIR)_Z/* $(DATADIR)/$(FONTDIR)


Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2005-03-13 07:06:26 UTC
So you unpack all the source tarballs, and then add *that* to cvs ?
Comment 3 Josh Hunt 2005-03-13 17:53:08 UTC
Yes, run an "ebuild ... unpack", and then check the whole thing in CVS.  Also, the workaround I used was in the makefile add the regexp [^CVS]* in replace of all of the wildcards "*" on the appropriate lines.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2005-03-14 00:47:55 UTC
How about just changing that to:

for i in $(KEYMAPSUBDIRS); do \
                install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/$$i ;\
                for j in $(KEYMAPDIR)_Z/$$i/*; do \
                        if test -f $$j; then \
                                install -m 644 $$j $(DATADIR)/$(KEYMAPDIR)/$$i ;\
                        fi; \
                done; \
        done
Comment 5 SpanKY gentoo-dev 2005-03-14 07:41:10 UTC
or what about `find -maxdepth 1 -type f` ?
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-10-04 23:57:34 UTC
azarah/spanky: is this bug still needed?
Comment 7 SpanKY gentoo-dev 2006-10-05 18:54:40 UTC
current situation is fine by me