FS#46610 - Pacman should only remove uneeded optional dependencies on pacman -Rs
|
Details
Summary and Info:
Steps to Reproduce: |
This task depends upon
Summary and Info:
If two packages are installed, that both have the same optional dependency (installed with --asdeps) and one of them is removed with pacman -Rs, pacman warns that there is a package that has an optional dependency, but removes it regardless.
Steps to Reproduce:
1. Install two packages with the same optional dependency.
2. Install the optional dependency with --asdeps.
3. Remove one of the two packages.
4. The optional dependency is missing.
Expected Result:
Pacman should only remove dependencies, that are installed as dependencies and are not needed by other packages (optional or not).
Maybe introduce a switch for the old behaviour like the orphan search (pacman -Qdt/pacman -Qdtt).
But if pkg1 depends on foo and pkg2 optdepends of foo, pacman -Rs pkg1 will remove foo, which it shouldn't. I guess this is what you saw.