Date: Tue, 1 Jun 2021 07:17:49 GMT From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: e70bedf4f71e - main - Mk/bsd.port.mk: Don't pass up an empty flavor. Message-ID: <202106010717.1517HnDG090907@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mat: URL: https://cgit.FreeBSD.org/ports/commit/?id=e70bedf4f71eda15307b550cefd028a5a4b0281a commit e70bedf4f71eda15307b550cefd028a5a4b0281a Author: Mathieu Arnold <mat@FreeBSD.org> AuthorDate: 2021-06-01 07:04:25 +0000 Commit: Mathieu Arnold <mat@FreeBSD.org> CommitDate: 2021-06-01 07:16:35 +0000 Mk/bsd.port.mk: Don't pass up an empty flavor. The classic way to handle flavors is to set: FLAVORS= foo bar FLAVOR?= ${FLAVORS:[0]} And in that case, FLAVOR is only set if the variable is not defined. If you pass an empty flavor using `FLAVOR=` then it remains empty after that line. It can leads to some ports with complicated logic to assume the wrong flavor is set. PR: 256301 Reported by: avg Differential Revision: https://reviews.freebsd.org/D30579 --- Mk/bsd.port.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 93318b02d332..e514bb7ffec1 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -4095,7 +4095,7 @@ _FLAVOR_RECURSIVE_SH= \ /*) ;; \ *) dir=${PORTSDIR}/$$dir ;; \ esac; \ - (cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} $${recursive_cmd}); \ + (cd $$dir; ${SETENV} $${flavor:+FLAVOR=$${flavor}} ${MAKE} $${recursive_cmd}); \ done # This script is shared among several dependency list variables. See file for
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106010717.1517HnDG090907>