conan
conan copied to clipboard
[bug] Using a version range with conan install -u leads to an error in case of empty package cache
I am having an empty Conan package cache resp. the package I want to install is not available in the local package cache. When I now type in
conan install pkgname/[^3.0.0]@ci/stable -o ... -o ... -u
I get following error message:
ERROR: Version range '^3.0.0' from requirement 'pkgname/[^3.0.0]@ci/stable' required by 'virtual' could not be resolved in local cache
Looking at the official docs of the -u option this behavior to me seems like a bug since it says that the remote is checked for the newest version matching the version range.
I am using Conan version 1.49
PS. When I leave out the -u it is working in case a version range matching package is available in the first remote from my configured list of remotes.
Hi @MTomBosch,
I could not reproduce the issue. What I did is:
- Create several packages in the range that I upload to a local repo
- Clear the cache
- Do the
conan install pkgname/[^3.0.0]@ci/stable -u
But the range is resolved for me if there's a package in the range in the local repository.
Am I missing something?
By the way, which Artifactory version are you using.
Thanks a lot.
I am using Conan version 1.39 locally where I got the issue. After updating to 1.51 I still get it. The Artifactory that we are using is the currently available JFrog Cloud solution. What version that is under the hood I do not know.
Here is also my conan.conf file:
[log]
run_to_output = True # environment CONAN_LOG_RUN_TO_OUTPUT
run_to_file = False # environment CONAN_LOG_RUN_TO_FILE
level = critical # environment CONAN_LOGGING_LEVEL
print_run_commands = False # environment CONAN_PRINT_RUN_COMMANDS
[general]
default_profile = default
compression_level = 9 # environment CONAN_COMPRESSION_LEVEL
sysrequires_sudo = True # environment CONAN_SYSREQUIRES_SUDO
request_timeout = 60 # environment CONAN_REQUEST_TIMEOUT (seconds)
default_package_id_mode = semver_direct_mode # environment CONAN_DEFAULT_PACKAGE_ID_MODE
revisions_enabled = 1
retry = 3
retry_wait = 30 # Retry wait time (seconds)
cache_no_locks = True # Locks not required since ci machines only run one pipeline/job at a time
use_always_short_paths = True # Stores every package on Windows in C:\.conan. The config stays in <user>/.conan
scm_to_conandata = True
[storage]
path = ./data
[proxies]
[hooks]
attribute_checker
Closing this as outdated, I think this shouldn't be an issue in Conan 2, but please create new tickets as necessary, thanks!