( 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.
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)
So you unpack all the source tarballs, and then add *that* to cvs ?
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.
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
or what about `find -maxdepth 1 -type f` ?
azarah/spanky: is this bug still needed?
current situation is fine by me