New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] System Manager updates always when a package is installed already #11715
Comments
Possibly closed by #11712 |
|
@czoido CCI uses the Conan docker images, which have no cached APT list, which means, we need to run About the config, I like the idea, it could be |
Thanks @uilianries for reporting this issue on my behalf. As a user I would definitely prefer to have control over when conan is pulling updates (or even touching external servers to update the index) and when not. Exposing this via |
It's listed as a bug, because the old
SystemPackageTool
has a different behavior, which, had an advantage:When a system package is installed on your machine, and you call
SystemPackageTool.install(..., update=True)
, Conan checks first if that package is already installed, then will run update + install after that, only when is not installed. The only exception is when the parameterforce=True
is configured (False by default).More information:
conan/conans/client/tools/system_pm.py
Line 123 in cb25aa8
The new designed of System Manager, runs
update
first, then it checks if it's installed or not:https://github.com/conan-io/conan/blob/develop/conan/tools/system/package_manager.py#L106
Thus, does not make sense forcing a new update, when all package are already installed. It would be better checking first, then compare if some package is missing, then install them.
Related to conan-io/conan-center-index#11936
/cc @emzeat
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Running on conanio/gcc10 docker image
Now, create a dummy conanfile.py with the follow section:
And don't forget to update the configuration mode:
tools.system.package_manager:mode=install
Logs (Executed commands with output) (Include/Attach if Applicable)
The text was updated successfully, but these errors were encountered: