Created attachment 225957 [details] Patch 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 Stop. make[1]: stopped in /usr/ports/net-mgmt/zabbix54-agent *** Error code 1 Stop. ``` Expected behavior after: ``` $ make FLAVOR=zabbix54 ... ===> Fetching all distfiles required by zabbix54-agent-5.4.1 for building $ echo $? 0 ```
Created differential revision https://reviews.freebsd.org/D32324
While I know the patch a year ago resolved this annoyance, it seems there has been a regression in the past week or so. I see bsd.port.mk was patched for some package config variables, not sure if somehow this broke things. could be portmaster but the same test cases with make fetch described here in are failing the same way in the ports tree. -- Installing: /usr/ports/databases/akonadi/work/stage/usr/local/share/locale/da/LC_MESSAGES/akonadi_knut_resource.mo -- Up-to-date: /usr/ports/databases/akonadi/work/stage/usr/local/share/locale/zh_CN -- Up-to-date: /usr/ports/databases/akonadi/work/stage/usr/local/share/locale/zh_CN/LC_MESSAGES -- Installing: /usr/ports/databases/akonadi/work/stage/usr/local/share/locale/zh_CN/LC_MESSAGES/akonadi_knut_resource.mo -- Installing: /usr/ports/databases/akonadi/work/stage/usr/local/share/locale/zh_CN/LC_MESSAGES/libakonadi5.mo ====> Compressing man pages (compress-man) ===>>> Starting check for runtime dependencies ===>>> Gathering dependency list for databases/akonadi from ports ===>>> The dependency for databases/sqlite3 seems to be handled by sqlite3-3.39.0,1 ===>>> Dependency check complete for databases/akonadi ===>>> akonadi-calendar-22.04.2 1/4 >> databases/akonadi (1/23) ===> akonadi-22.04.3_1 FLAVOR is defined (to default) while this port does not have FLAVORS. *** Error code 1 Stop. make: stopped in /usr/ports/databases/akonadi ===>>> Installation of akonadi-22.04.3_1 (databases/akonadi) failed ===>>> Aborting update ===>>> Update for databases/akonadi failed ===>>> Aborting update ===>>> Update for akonadi-calendar-22.04.2 failed ===>>> Aborting update
(In reply to alt2600 from comment #2) This appears a duplicate of 265084 which I have just fixed in portmaster 3.22. It was caused by a commented out call to set the flavor used for "make all" again for "make install". The scan for run dependencies can leak a flavor that applies to the dependency into the environment used to execute "make install", and therefore the FLAVOR needed to be reset to its previous value at that point. I had commented out the call that sets the flavor before "make install", a long time ago. I hope this was not because of some other flavor related issue, but cannot remember any details causing that prior change. I'll set the status of this PR to FIXED, since the initial issue has been corrected in bsd.port.mk, one year ago, and the new issue did only affect portmaster and is fixed in portmaster version 3.22.