Hi I had some trouble with kde dependance pilot-link. The environment variable GZIP=-9 cause the ebuild to fail. ---original problem---------------------------------------------- While building kde the dependency pilot-link- 0.9.6 failed. Without sandbox the following output was generated: ... mkdir /var/tmp/portage/pilot-link-0.9.6-r3/image/usr/share/man/man1 mkdir /var/tmp/portage/pilot-link-0.9.6-r3/image/usr/share/man/man7 for m in ./man/*.1; do \ /bin/sh ./libtool /bin/install -c -m 644 $m /var/tmp/portage/pilot-link-0.9.6- r3/image//usr/share/man/man1/`basename $m`; \ /bin/cat $m | /bin/gzip > /var/tmp/portage/pilot-link-0.9.6-r3/image//usr/share/man/man1/`basename $m`.gz; \ done /bin/install -c -m 644 ./man/dlpsh.1 /var/tmp/portage/pilot-link-0.9.6- r3/image//usr/share/man/man1/dlpsh.1 /bin/install -c -m 644 ./man/ietf2datebook.1 /var/tmp/portage/pilot-link-0.9.6- r3/image//usr/share/man/man1/ietf2datebook.1 /bin/sh: /bin/gzip: No such file or directory ... After ebuild the /bin/gzip was missing and a file /bin/gzip.gz exists. --- analyze---------------------------------------------- After a lot of testing and reading I found out what has happened. - I have an environment variable for GZIP with defailt options: GZIP=-9 - the Makefile of pilot-link contains the following segments: ... GZIP = /bin/gzip ... for m in ${srcdir}/man/*.1; do \ $(INSTALL_DATA) $$m $(mandir1)/`basename $$m`; \ $(CAT) $$m | $(GZIP) > $(mandir1)/`basename $$m`.gz; \ done If no environment variable is missing then the make variable seems to be treated as local. If an evironment variable GZIP exists then it is overwritten and forewarded to the sub-shell. - The following command was called with environment GZIP=/bin/gzip cat somefile.1 | /bin/gzip > somedir/somefile.1.gz gzip internally merges the $GZIP with the commandline and executes "/bin/gzip /bin/gzip" uups ---Question------------------------------------------------------------- What's wrong with my GZIP="-9" ? bye Michael Tartsch <mt@vamos.de>
reassigning back to me, sorry!
I am very unhappy with such a hidden side effect with GZIP, gzip and make. Assume that someone write a makefile with GZIP="/bin/bash -v /some/path/wrap-gzip.sh" ... $(GZIP) manual.1 This will work, but if someone has GZIP in env then bash is roasted.
I don't think it's unreasonable to fix this bug by unsetting GZIP or using a different var name.