Skip to content

cmd_clean command removes wrong packages #44

@antze-k

Description

@antze-k

The command removes all package revisions except for the latest one from a recipe, but not a package. This leads to the following: if I build two packages for a single recipe, for example, Debug and Release one, "conan clean" removes one of them (the one that was built the first, I suppose).

I think the correct behaviour would be if this:

all_prevs = conan_api.search.package_revisions(f"{rrev.repr_notime()}:*#*", remote=remote)
# ...

is replaced with this:

packages = conan_api.list.packages_configurations(rrev, remote=remote)
for package in packages:
    all_prevs = conan_api.search.package_revisions(repr(package), remote=remote)
    # ...

At least, with such fix the behaviour looks like what I expected, so far.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions