Closed uilianries closed 1 year ago
So far, CONAN_SYSREQUIRES_MODE is the environment variable which rules the legacy SystemPackageTool, however, with the migration of recipe and modernization of package manager support, the conan.tools.system.package_manager uses config to enable installing by default.
As current workaround, need to run script before to build on Docker to enable it, updating the global config file.
The feature consists updating it automatically, by adding a new cpt option, which will update both legacy and modern version. For instance:
CPT_SYSREQUIRES_MODE=[install, check, disable]
install
CONAN_SYSREQUIRES_MODE=enabled
tools.system.package_manager:mode=install
check
CONAN_SYSREQUIRES_MODE=verify
tools.system.package_manager:mode=check
disabled
CONAN_SYSREQUIRES_MODE=disabled
tools.system.package_manager:mode=None
False
None
CONAN_SYSREQUIRES_SUDO=[true,false]
true
1
yes
sudo
false
0
no
CONAN_SYSREQUIRES_TOOL=[apt-get, yum, dnf, brew, pacman, choco, zypper, pkg, pkgutil]
It follows those supported tools listed on modern system package
I would prefer some generic feature allowing to set arbitrary conf variables on command line. then, build tools.system.package_manager:mode on top of it.
tools.system.package_manager:mode
@SSE4 Yes, it sounds even better.
Description of Problem, Request, or Question
So far, CONAN_SYSREQUIRES_MODE is the environment variable which rules the legacy SystemPackageTool, however, with the migration of recipe and modernization of package manager support, the conan.tools.system.package_manager uses config to enable installing by default.
As current workaround, need to run script before to build on Docker to enable it, updating the global config file.
The feature consists updating it automatically, by adding a new cpt option, which will update both legacy and modern version. For instance:
install
: equivalent toCONAN_SYSREQUIRES_MODE=enabled
+tools.system.package_manager:mode=install
check
: equivalent toCONAN_SYSREQUIRES_MODE=verify
+tools.system.package_manager:mode=check
disabled
: equivalent toCONAN_SYSREQUIRES_MODE=disabled
+tools.system.package_manager:mode=None
(It should acceptFalse
andNone
too)true
,1
,yes
: Usessudo
command to execute the system package manager toolfalse
,0
,no
: Do not usesudo
command to execute the system package manager toolIt follows those supported tools listed on modern system package