From 873d4f6f9905bae3fe580e86aaebbbe994adba97 Mon Sep 17 00:00:00 2001 From: "Andrew \"RhodiumToad\" Gierth" Date: Tue, 13 Jun 2023 22:09:59 +0200 Subject: [PATCH] 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 --- Mk/Scripts/depends-list.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mk/Scripts/depends-list.sh b/Mk/Scripts/depends-list.sh index 6c3e03c33288c..ab724b58ab1e9 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