Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 188 - environment variable GZIP cause pilot-link-0.9.6.ebuild (kde) to fail ?
Summary: environment variable GZIP cause pilot-link-0.9.6.ebuild (kde) to fail ?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Bart Verwilst
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-15 17:29 UTC by Michael Tartsch
Modified: 2003-02-04 19:42 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 Michael Tartsch 2002-01-15 17:29:42 UTC
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>
Comment 1 Mikael Hallendal (hallski) (RETIRED) gentoo-dev 2002-01-16 14:07:37 UTC
reassigning back to me, sorry!
Comment 2 Michael Tartsch 2002-01-17 04:01:03 UTC
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.
Comment 3 Daniel Robbins (RETIRED) gentoo-dev 2002-02-01 15:34:10 UTC
I don't think it's unreasonable to fix this bug by unsetting GZIP or using a
different var name.