Subject: wrong exit code in mk/pkginstall/{dirs,files,install}
To: None <tech-pkg@NetBSD.org>
From: Klaus Heinz <k.heinz@dezsieben.kh-22.de>
List: tech-pkg
Date: 12/30/2007 17:39:45
Hi,
according to the comments in mk/pkginstall/dirs
# The CHECK-PERMS action will return non-zero if it detects directories
# with wrong ownership or permissions.
The current script fragments dirs, files and install do not do that
because the exit code gets lost due to the early removal of the temporary
directory:
case "$printed_header" in
yes) ${ECHO} ""
${ECHO} "==================================================="
-> exit 1
;;
esac; }
-> ${RM} -fr $tmpdir
-> ${TEST} $? -eq 0 || exitcode=1
;;
Is it ok to switch those two lines from
${RM} -fr $tmpdir
${TEST} $? -eq 0 || exitcode=1
to
${TEST} $? -eq 0 || exitcode=1
${RM} -fr $tmpdir
in the three affected files?
ciao
Klaus