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.
Happy scanning,
--
Alesh Slovak Linux Team -- AVASYS Corporation
alesh.slo...@avasys.jp http://avasys.jp
--
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/4c3116ab.3000...@avasys.jp