[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



Alesh Slovak wrote (Mon, 5 Jul 2010):
> On 07/05/2010 09:22 AM, Brendon Higgins wrote:
> >> The "test -e" command is protected by an "&&", so a failure will not
> >> trigger an early exit and all files will be correctly removed.
> > 
> > I guess you're right. But I tried the script with "exit 0" added at the
> > last line and it failed anyway. I added "echo blah" statements to find
> > where it was aborting, and it seemed to be at that test statement. When
> > I changed it to an if ... fi clause, the problem ceased.
> 
> That's odd, our testing went just fine.

Something really odd seems to be going on. It works without errors when I try 
this:
awk '{print $2}' $STATE_DIR/clean-files \
    | while read file; do
    echo "ha"
    test -e ${DESTDIR}$file && rm -f ${DESTDIR}$file
    echo "ho"
done

However, if I comment out the echo "ho" line, it fails. It's like the result 
of the test on that last line is erroneously propagating as the result of the 
loop, or something.

> Can you tell me what shell you are using?

/bin/sh links to dash. I just updated to the latest in unstable - problem 
remains. Users see bash.

I also noticed that both files listed in clean-files actually exist, both before 
and after I run update-initramfs. But the rm shouldn't return an error, and 
even if it does, adding an echo command after it shouldn't fix it. At least, I 
don't see why.

Really weird. :-S

Peace,
Brendon



Reply to: