Alesh Slovak wrote (2010-07-05 09:18): > On 07/03/2010 10:24 AM, Brendon Higgins wrote: > > 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. > > I had thought the same at first, but according to the bash man page, the > `-e` option "exits immediately if any *untested* command fails". A similar > statement exists in the dash man page as well. > > 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. So I don't know why it was doing that. Peace, Brendon -- To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201007051022.56651.blhigg...@gmail.com