pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/flavor/pkg Fix broken shell code:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5e7e0473fb58
branches:  trunk
changeset: 542746:5e7e0473fb58
user:      tron <tron%pkgsrc.org@localhost>
date:      Mon May 26 14:21:43 2008 +0000

description:
Fix broken shell code:
You must *not* use "test ... && ..." when you use "set -e". Because if the
first expression fails your shell script will abort.

This should fix problem with NetBSD-current's (correctly behaving)
"/bin/sh" report on current-users by David Holland and Kurt Schreiner.

diffstat:

 mk/flavor/pkg/depends.mk |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 90ccacbb1202 -r 5e7e0473fb58 mk/flavor/pkg/depends.mk
--- a/mk/flavor/pkg/depends.mk  Mon May 26 13:39:08 2008 +0000
+++ b/mk/flavor/pkg/depends.mk  Mon May 26 14:21:43 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: depends.mk,v 1.42 2008/04/03 14:07:51 joerg Exp $
+# $NetBSD: depends.mk,v 1.43 2008/05/26 14:21:43 tron Exp $
 
 # This command prints out the dependency patterns for all full (run-time)
 # dependencies of the package.
@@ -122,7 +122,7 @@
        exec 3<&0;                                                      \
        ${CAT} ${_DEPENDS_FILE} |                                       \
        while read type pattern dir; do                                 \
-               ${TEST} "$$type" = "bootstrap" && continue;             \
+               ${TEST} "$$type" != "bootstrap" || continue;            \
                ${_DEPENDS_INSTALL_CMD} 0<&3;                           \
        done
 
@@ -167,7 +167,7 @@
 _flavor-bootstrap-depends:
        ${RUN}${_LIST_DEPENDS_CMD.bootstrap} |                          \
        while read type pattern dir; do                                 \
-               ${TEST} "$$type" != "bootstrap" && continue;            \
+               ${TEST} "$$type" = "bootstrap" || continue;             \
                ${_DEPENDS_INSTALL_CMD};                                \
        done
 



Home | Main Index | Thread Index | Old Index