cmd_clean command removes wrong packages
- Dominant language
- Python
- Stars
- 125
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
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:
```py
all_prevs = conan_api.search.package_revisions(f"{rrev.repr_notime()}:*#*", remote=remote)
# ...
```
is replaced with this:
```py
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.