Page MenuHomeFreeBSD

net/unison*, audio/asterisk-*: Fix syntax errors in how FLAVOR is set

Authored by tobik on Nov 24 2019, 8:03 AM.
Referenced Files
F89069757: D22530.diff
Tue, Jul 23, 2:15 AM
Unknown Object (File)
May 17 2024, 8:27 PM
Unknown Object (File)
May 17 2024, 8:27 PM
Unknown Object (File)
May 17 2024, 8:27 PM
Unknown Object (File)
May 16 2024, 3:27 AM
Unknown Object (File)
May 3 2024, 6:55 PM
Unknown Object (File)
Apr 24 2024, 8:53 PM
Unknown Object (File)
Apr 20 2024, 4:32 PM



Something like ${FLAVORS[1]} looks up a variable named FLAVORS[1].
It is not equivalent to ${FLAVORS:[1]} which looks up the first
word of a variable named FLAVORS. The second form is what should
be used to set FLAVOR as otherwise it is set to an empty value
and we might as well replace FLAVOR?=${FLAVORS[1]} with FLAVOR?=.
This potentially breaks ports builds of the default flavor outside
of Poudriere since something like

FLAVORS=	foo bar
.if ${FLAVOR} == foo
# ...
# ...

will *always* take the else branch.

In the asterisk-* ports we do not really need to set FLAVOR but
I left it in anyway.

Test Plan

Poison ports with

.if empty(FLAVOR)
.error whoops

directly after FLAVOR?=. It should produce an error before
applying this change but not afterwards.

Diff Detail

rP FreeBSD ports repository
No Lint Coverage
No Test Coverage
Build Status
Buildable 27740
Build 25938: arc lint + arc unit

Event Timeline

Thanks for noticing this. It clearly was an oversight on my part!

This revision is now accepted and ready to land.Nov 24 2019, 10:01 AM