Skip to content

Commit

Permalink
Mk/Scripts: Fix ports depends-list.sh
Browse files Browse the repository at this point in the history
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
  • Loading branch information
RhodiumToad authored and pizzamig committed Jun 13, 2023
1 parent 2bdde68 commit 873d4f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Mk/Scripts/depends-list.sh
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 873d4f6

Please sign in to comment.