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

Bug#586554: update-initramfs fails to generate initrd.img-2.6.32-5-686 in Debian testing when upgrading from 0.96 to 0.97



Hi Alesh,

Alesh Slovak wrote (Thursday 01 July 2010):
> If the very last file that iscan's hook script checks for in DESTDIR
> doesn't exist, the `test -e` call fails and the script ends with a failed
> status even though nothing really went wrong. A simple `exit 0` on the
> last line fixes this.

It's actually not that simple. Running the iscan hook script with "set -e" 
means that the script will abort with an error status as soon as the "test -e" 
fails for any file in the clean-files list. Adding "exit 0" at the end of the 
script won't fix that, because the script will never reach that point anyway. 

Additionally, this means that the script does not remove all the existing files 
listed in clean-files that come after the first file that doesn't exist.

Probably the easiest solution is to just turn that troublesome "test -e" line 
into an if ... fi clause, e.g.:
if test -e ${DESTDIR}$file; then rm -f ${DESTDIR}$file; fi
or something similar.

You might have realised this already, but I felt that it's better to be safe 
than sorry. :-)

Peace,
Brendon

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: