Inserted "set -e" as the first command in the show-depends-dirs target

to force an early exit as soon as a "cd" command fails. Otherwise, "/"
would have been added as a dependency, leading to undefined behavior.
See PR 32202 for details.

Fixes the second item of PR 32202.
This commit is contained in:
rillig 2005-12-01 00:27:56 +00:00
parent be7bdd3b87
commit f39d78748c

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.mk,v 1.1770 2005/12/01 00:17:05 rillig Exp $
# $NetBSD: bsd.pkg.mk,v 1.1771 2005/12/01 00:27:56 rillig Exp $
#
# This file is in the public domain.
#
@ -1403,7 +1403,8 @@ do-fetch:
.if !target(show-depends-dirs)
_ALL_DEPENDS= ${DEPENDS} ${BUILD_DEPENDS}
show-depends-dirs: do-check-pkg-fail-reason
@dlist=""; \
@set -e; \
dlist=""; \
depends=${_ALL_DEPENDS:C/^[^:]*://:O:u:Q}; \
for reldir in $$depends; do \
case $$reldir in \