FS#59711 - Dependency loop makes impossible to find unused dependency (ffmpeg in my case)
Attached to Project:
Pacman
Opened by Manuel Reimer (M-Reimer) - Saturday, 18 August 2018, 18:48 GMT
Opened by Manuel Reimer (M-Reimer) - Saturday, 18 August 2018, 18:48 GMT
|
Details
Summary and Info:
Since probably the last Pacman update a # pacman -Qdt and even # pacman -Qdtt no longer report ffmpeg as unused even if installed as "--asdeps". I needed several hours to find a potential reason, but it seems like ffmpeg depends on x264 which, on the other hand, depends on ffmpeg. So the two packages seem to depend on each other which causes some kind of "dependency loop" where none of them is "unused" anymore. Steps to Reproduce: Install ffmpeg with "--asdeps" on a "clean" (just base and probably base-devel) virtual machine. Run pacman -Qdtt. Espected behaviour: ffmpeg should be reported as unused dependency but is not. |
This task depends upon
Run
# pacman -Rsc ffmpeg
followed by
# pacman -S --asdeps ffmpeg
now ffmpeg should be reported by
# pacman -Qdtt
right? Wrong!
Here, pacman needs a bit more "intelligence" to detect this "internal loop".
If all "real" users of ffmpeg are gone, then I expect pacman to show me ffmpeg with its dependencies as "unused". This "internal loop" should be unrolled.
If you think that "-Qdtt" shouldn't be able to ever list ffmpeg as "unused", then please provide some other mechanism so I can know which packages on my system are not *really* used by other packages.
This "comm ..." line is really hard to use in scripts. Requires to run some external shell to work. I think there should at least be some simple command line option to print out everything that can be uninstalled as soon as the "explicitly installed" users are gone.
I thought that that's exactly what "pacman -Qdt" is meant for.
User's don't care much about the internal details and IMHO it is bad that ffmpeg somewhat "self locks" itself from getting uninstalled "the easy way" as pacman isn't smart enough to just ignore locking "circular dependencies" that are part of the repository.
Note that pacman -Rns will know how to remove them both, when recursively removing the dependencies of a third package. This is possible because there's an explicit list of dependencies to remove, and all that is needed is to remove each one that has a valid removal path.