You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If SCons.Variables.PackageVariable.PackageVariable is initialised with a default "false" string, it will not be possible to enable the key by using a true boolean nor true string.
passing scons 'icu=yes' on the command line will not enable the key, only passing a /path will enable the key.
Moreover passing 'icu=yes' will result in a build failure:
scons: *** Path does not exist for variable 'icu': 'no'
This is because the PackageVariable_converter only compares default against ENABLE_STRINGS and so when a cli true value is passed the default value gets returned, however as a string.
The PackageVariable_validator will then parse this default value that should have been a bool as a string and will expect it to be a path.
# Can't return the default if it is one of the enable/disable strings;
# test code expects a bool.
ifdefaultinENABLE_STRINGS:
if this last line is modified to include DISABLE_STRINGS then the PackageVariable module works as expected. i.e.
ifdefaultinENABLE_STRINGS+DISABLE_STRINGS:
This is with scons-4.9.0 with python-3.12.9 on Gentoo amd64 (both installed by Gentoo's package manager)
Downstream Bug: https://bugs.gentoo.org/950584
The text was updated successfully, but these errors were encountered:
If SCons.Variables.PackageVariable.PackageVariable is initialised with a default "false" string, it will not be possible to enable the key by using a true boolean nor true string.
Given a SConscript file with something like
passing scons 'icu=yes' on the command line will not enable the key, only passing a /path will enable the key.
Moreover passing 'icu=yes' will result in a build failure:
scons: *** Path does not exist for variable 'icu': 'no'
This is because the
PackageVariable
_converter
only compares default againstENABLE_STRINGS
and so when a cli true value is passed the default value gets returned, however as a string.The
PackageVariable
_validator
will then parse this default value that should have been a bool as a string and will expect it to be a path.scons/SCons/Variables/PackageVariable.py
Lines 87 to 89 in d54721e
if this last line is modified to include DISABLE_STRINGS then the
PackageVariable
module works as expected. i.e.This is with scons-4.9.0 with python-3.12.9 on Gentoo amd64 (both installed by Gentoo's package manager)
Downstream Bug: https://bugs.gentoo.org/950584
The text was updated successfully, but these errors were encountered: