Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#46610 - Pacman should only remove uneeded optional dependencies on pacman -Rs

Attached to Project: Pacman
Opened by Stefan (Aentfs) - Thursday, 08 October 2015, 16:00 GMT
Task Type Feature Request
Category General
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 4.2.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Summary and Info:


Steps to Reproduce:
This task depends upon

Comment by Stefan (Aentfs) - Thursday, 08 October 2015, 16:07 GMT
Sorry, accidentally hit enter and can't find the edit button on the bug itself.

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).
Comment by Allan McRae (Allan) - Thursday, 08 October 2015, 16:40 GMT
I can not get pacman to remove an optional dependency with -Rs at all...

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.
Comment by Stefan (Aentfs) - Thursday, 08 October 2015, 18:15 GMT
Actually this might, as I was uninstalling a package that didn't pull any dependency (as I already had all the dependencies) and didn't really check, if it was an optdep or a normal dep. I only saw the warning that pacman shows when a package is removed that is an optional dependency.

Loading...