conan search --outdated lists all existing packages instead of only outdated ones, contrary to its description in conan search --help, which states "Show only outdated from recipe packages".
conan search --outdatedExisting package recipes:
Qt/5.11.1@bincrafters/stable
boost/1.67.0@conan/stable
conan remove --outdated "*"WARN: No matching packages to remove for Qt/5.11.1@bincrafters/stable
WARN: No matching packages to remove for boost/1.67.0@conan/stable
conan search boost/1.67.0@conan/stableOutdated from recipe: True because of the first result, but instead got:Outdated from recipe: FalseUbuntu 18.04 x64
Conan 1.6.0
The --outdated works only if a specific reference is specified. The commands "search" and "remove" and their help messages have to be fixed. e.g: conan search boost/1.67.0@conan/stable --outdated
I would prefer if conan search --outdated really iterated through all local packages and showed which of them are outdated, without forcing the user to do so manually for each package. Similarly for conan remove --outdated.
Edit: I found that instead of manual checking I can invoke conan search --raw | xargs -i conan search {} --outdated, which is much less readable than conan search --outdatedand still gives strange output (see next comment).
The command mentioned by you conan search boost/1.67.0@conan/stable --outdated also doesn't seem to work correctly. It gives this output:
Existing packages for recipe boost/1.67.0@conan/stable:
There are no packages for reference 'boost/1.67.0@conan/stable', but package recipe found.
But when I do conan search boost/1.67.0@conan/stable, I get two packages (attached below).
Even if we assume that it was meant to say "There are no outdated packages for reference 'boost/1.67.0@conan/stable'", we still have the second part of the sentence - "but package recipe found". If it was mentioned in this context, it means it has to be outdated. But then the packages themselves also have to be outdated from the recipe, which leads to a contradiction.
$ conan search boost/1.67.0@conan/stable
Existing packages for recipe boost/1.67.0@conan/stable:
Package_ID: 6fe944f1a83f19465745274fc281b866d1a8b244
[options]
fPIC: True
header_only: False
shared: True
skip_lib_rename: False
without_atomic: False
without_chrono: False
without_container: True
without_context: True
without_contract: True
without_coroutine: True
without_date_time: False
without_exception: True
without_fiber: True
without_filesystem: False
without_graph: True
without_graph_parallel: True
without_iostreams: True
without_locale: True
without_log: False
without_math: True
without_mpi: True
without_program_options: True
without_python: True
without_random: True
without_regex: False
without_serialization: True
without_signals: True
without_stacktrace: True
without_system: False
without_test: True
without_thread: False
without_timer: True
without_type_erasure: True
without_wave: True
[settings]
arch: x86_64
build_type: Release
compiler: gcc
compiler.libcxx: libstdc++11
compiler.version: 8
os: Linux
Outdated from recipe: False
Package_ID: fc7dbb402c20b377d23d0d09244a85e3feccfdfb
[options]
fPIC: True
header_only: False
shared: True
skip_lib_rename: False
without_atomic: False
without_chrono: False
without_container: True
without_context: True
without_contract: True
without_coroutine: True
without_date_time: False
without_exception: True
without_fiber: True
without_filesystem: False
without_graph: True
without_graph_parallel: True
without_iostreams: True
without_locale: True
without_log: False
without_math: True
without_mpi: True
without_program_options: True
without_python: True
without_random: True
without_regex: False
without_serialization: True
without_signals: True
without_stacktrace: True
without_system: False
without_test: True
without_thread: False
without_timer: True
without_type_erasure: True
without_wave: True
[settings]
arch: x86_64
build_type: Debug
compiler: gcc
compiler.libcxx: libstdc++11
compiler.version: 8
os: Linux
Outdated from recipe: False
Sorry, closed by accident.
So, the things to fix are:
--outdated can only be used with a reference.--oudated is used without a referenceconan search boost/1.67.0@conan/stable --outdated that now says: There are no packages for reference 'boost/1.67.0@conan/stable', but package recipe found to say There are no packages oudated packages for reference 'boost/1.67.0@conan/stable'About modifying how the command works (only for a reference), we are leaving the command as is for now. It could be discussed in a different issue if needed.
Seems @joechrisellis would be willing to contribute a PR to fix this, wouldn't you?
@danimtb yep! This will be my first PR to conan, just familiarising myself with the contribution guide before I submit a PR. Cheers!
Merged #3341 that fixes this issue
Most helpful comment
@danimtb yep! This will be my first PR to conan, just familiarising myself with the contribution guide before I submit a PR. Cheers!