Bug 256736 - Mk/bsd.port.mk: _FLAVOR_RECURSIVE_SH passes flavor to child make
Summary: Mk/bsd.port.mk: _FLAVOR_RECURSIVE_SH passes flavor to child make
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
Keywords: needs-qa, regression
Depends on:
Reported: 2021-06-20 18:25 UTC by R Williams
Modified: 2021-06-21 01:45 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (portmgr)

Patch (431 bytes, patch)
2021-06-20 18:25 UTC, R Williams
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description R Williams 2021-06-20 18:25:48 UTC
Created attachment 225957 [details]

The change introduced in bug #256301 (review D30579), which prevents child make processes from receiving an empty `FLAVOR` variable when `FLAVOR` should be unset has the side effect of allowing any `FLAVOR` already in the parent make process environment to propagate to the child.

The attached patch unsets `FLAVOR` before starting the child make.

Behavior before:
    $ make FLAVOR=zabbix54
    ===>  zabbix54-agent-5.4.1 FLAVOR is defined (to zabbix54) while this port does not have FLAVORS.
    *** Error code 1
    make[1]: stopped in /usr/ports/net-mgmt/zabbix54-agent
    *** Error code 1

Expected behavior after:
    $ make FLAVOR=zabbix54
    ===> Fetching all distfiles required by zabbix54-agent-5.4.1 for building
    $ echo $?