[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[patch] kernel.sh



In kernel.sh, various output is piped to gzip, however, if the file that
gzip is outputting to does not already exist, it outputs a warning that
trips up the kernel.sh script which results in 'make release' failing. This
is because gzip default behavior is to save a copy of the file it is 
compressing.  When that file is standard input, gzip apparently assumes that
the standard input is named 'filename' if the output file is 'filename.gz'.

Error message:

I: creating sys_map.gz

gzip: stdin: fstat(stdin)
E: ./kernel.sh abort
make[1]: *** [modules.tgz] Error 1
make[1]: *** Deleting file `modules.tgz'
make[1]: Leaving directory `/home/james/cvstest/boot-floppies'
make: *** [build] Error 2

This behavior can be reproduced easily by running 'make clean' before
'make release'.

gzip version:
1.2.4-33

FIX:  I simply added the '--no-name' flag to gzip and the scripts works fine.

results of 'cvs diff -u':

Index: boot-floppies/kernel.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/kernel.sh,v
retrieving revision 1.23
diff -u -r1.23 kernel.sh
--- boot-floppies/kernel.sh     2001/04/08 08:10:44     1.23
+++ boot-floppies/kernel.sh     2001/04/17 21:46:58
@@ -105,11 +105,11 @@
 fi
 
 info "creating sys_map$subarch.gz"
-cat $extractdir/boot/System.map-* | gzip -9 > sys_map$subarch.gz
+cat $extractdir/boot/System.map-* | gzip --no-name -9 > sys_map$subarch.gz
 
 info "creating config$subarch.gz"
 # copy the config getting rid of comments and blank lines
-cat $extractdir/boot/config-* | grep -vE '^(#|$)' | gzip -9 > config$subarch.gz
+cat $extractdir/boot/config-* | grep -vE '^(#|$)' | gzip --no-name -9 > config$subarch.gz
 
 rm -rf $extractdir


Thanks,

James Strandboge
jstrand1@rochester.rr.com



Reply to: