Page MenuHomeFreeBSD

Fix [DE]SELECTED_OPTIONS to lazily evaluate.
ClosedPublic

Authored by bdrewery on Nov 14 2017, 7:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 11:27 PM
Unknown Object (File)
Wed, Nov 6, 12:55 PM
Unknown Object (File)
Fri, Oct 25, 9:49 AM
Unknown Object (File)
Fri, Oct 25, 9:28 AM
Unknown Object (File)
Oct 3 2024, 3:56 PM
Unknown Object (File)
Sep 30 2024, 6:30 AM
Unknown Object (File)
Sep 19 2024, 2:06 AM
Unknown Object (File)
Sep 14 2024, 7:44 PM
Subscribers

Details

Summary

If a port modifies OPTIONS_UNSET after including bsd.port.options.mk
then these values were wrong even though all of 'showconfig',
'pretty-print-config', and the package generated all had the expected
options.

Only Poudriere and synth use these variables for incremental build checks.
My initial thoughts were that the print/ghostscript9-agpl-base/files/Makefile.drivers_post
file is wrong for modifying OPTIONS this late but the fact that all
other options printers and the package work as the port expects makes
me accept it.

The alternative to using bmake :@ here would be to move the existing
code to bsd.port.mk at the end of the pre-check-config block.

Test Plan

Some local poudriere bulk runs.

Before:

% cd print/ghostscript9-agpl-base
% echo "print_ghostscript9-agpl-base_UNSET= CUPS" >> /etc/make.conf
% make -V 'SELECTED_OPTIONS:tl:M*cups*'
gs_cups
% make -V 'DESELECTED_OPTIONS'
GS_png48 CUPS

After:

% cd print/ghostscript9-agpl-base
% echo "print_ghostscript9-agpl-base_UNSET= CUPS" >> /etc/make.conf
% make -V 'SELECTED_OPTIONS:tl:M*cups*'

% make -V 'DESELECTED_OPTIONS'
CUPS GS_cups GS_png48

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

In D13092#272310, @sjg wrote:

:@ rocks

Yup, I had this originally but I couldn't get DESLECTED_OPTIONS to work nicely and I felt it was too obscure.

SELECTED_OPTIONS= ${ALL_OPTIONS:@opt@${PORT_OPTIONS:M${opt}}@} ${MULTI GROUP SINGLE RADIO:L:@otype@${OPTIONS_${otype}:@m@${OPTIONS_${otype}_${m}:@opt@${PORT_OPTIONS:M${opt}}@}@}@}
This revision is now accepted and ready to land.Nov 15 2017, 9:47 AM

Note that other places may benefit :@

This revision was automatically updated to reflect the committed changes.

If a port modifies OPTIONS_UNSET after including bsd.port.options.mk

But, OPTIONS_SET/UNSET are variables that can only be used in /etc/make.conf, so this case should not happen. Which port does something stupid like this ?