diff options
author | Andrew "RhodiumToad" Gierth <andrew@tao11.riddles.org.uk> | 2023-06-13 20:09:59 +0000 |
---|---|---|
committer | Luca Pizzamiglio <pizzamig@FreeBSD.org> | 2023-06-13 20:09:59 +0000 |
commit | 873d4f6f9905bae3fe580e86aaebbbe994adba97 (patch) | |
tree | f15e27c7338c8fe088b7cdd0172a7275426f53e4 | |
parent | 2bdde68a3e8903aff6e5eb5c371d44c9e147d547 (diff) | |
download | ports-873d4f6f9905bae3fe580e86aaebbbe994adba97.tar.gz ports-873d4f6f9905bae3fe580e86aaebbbe994adba97.zip |
Mk/Scripts: Fix ports depends-list.sh
depends-list.sh fails in two ways: one is a simple quoting bug which
causes empty FLAVOR variables to be propagated; the other is that
de-duplication is being done without regard for flavors.
The upshot of these is that where a port depends on a specific flavor
(first bug) or on multiple flavors (second bug, usually caused by build
dependencies) of another port, the constructed dependency list is
incomplete, and so -recursive targets do not do all the required work.
(This is especially annoying for fetch-recursive.)
Reviewed by: portmgr@FreeBSD.org
PR: 269982
Differential Revision: https://reviews.freebsd.org/D40491
-rw-r--r-- | Mk/Scripts/depends-list.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Mk/Scripts/depends-list.sh b/Mk/Scripts/depends-list.sh index 6c3e03c33288..ab724b58ab1e 100644 --- a/Mk/Scripts/depends-list.sh +++ b/Mk/Scripts/depends-list.sh @@ -76,7 +76,7 @@ check_dep() { ;; esac if [ -f ${d}/Makefile ]; then - if [ -n $f ]; then + if [ -n "$f" ]; then export FLAVOR=$f fi break @@ -91,9 +91,9 @@ check_dep() { fi case " ${checked} " in - *\ ${d}\ *) continue ;; # Already checked + *\ ${port_display}\ *) continue ;; # Already checked esac - checked="${checked} ${d}" + checked="${checked} ${port_display}" # Check if the dependency actually exists or skip otherwise. if [ ! -d "${d}" ]; then echo "${dp_PKGNAME}: \"${port_display}\" non-existent -- dependency list incomplete" >&2 |