rmarquis / pacaur

[unmaintained] An AUR helper that minimizes user interaction
https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144
ISC License
796 stars 114 forks source link

Issue a message when a package is not need anymore by any other installed package. #623

Closed ArchangeGabriel closed 7 years ago

ArchangeGabriel commented 7 years ago
Version

pacaur -v

pacaur 4.6.10
Description

Sometimes, a package foo has dependency bar removed. Then, it can happens that no other installed packaged depends on bar. At this point, bar is a locally orphaned package, returned by e.g. pacaur -Qdtq. At this point, I’d like to have pacaur issue me a message like “Dependency bar isn’t required anymore by any installed package” or something like that.

Bonus point: do a similar thing for packages that moves from being depended on to just optdepended on.

Output

pacaur -Syu

<upgrading foo to x.y.z>
Dependency `bar` isn’t required anymore by any installed package

Thanks!

rmarquis commented 7 years ago

Are you sure that isn't already implemented? There is a check done before the update/install here, and another one done at the end here. If both results differ, then it means new orphaned dependencies are detected and a warning is issued (but only once).

I might indeed try to do something similar for optdepends.

ArchangeGabriel commented 7 years ago

Well it didn’t worked apparently. libxfont wasn’t detected as such some days ago (I could have missed it though), and I can reproduce it on removing packages also, but I suppose this one is expected (I know about -Rs): I installed a package with only one dependency not already present on my system, then removed the package, no warning.

rmarquis commented 7 years ago

Pacaur only warns about new AUR orphan after updating/installing a package. It doesn't handle binary packages as it merely passes the job to pacman. And I am not sure it should do it for binary package either.

ArchangeGabriel commented 7 years ago

Why so? Or do you mean it should be pacman job?

rmarquis commented 7 years ago

Yes, or the user job. Checking pacman -Qdt should be part of regular user maintenance. Pacaur only aims at extending pacman to the AUR, not adding feature to pacman itself.

rmarquis commented 7 years ago

New optional package check implemented in de94669623039068900458fd0117230c25f3b6bc.

ArchangeGabriel commented 7 years ago

Yes, and I do run this command quite often, however I keep a certain number of packages appearing in this list for several reasons so that I need to look for new apparitions, and I see no point in having to make the diff myself if pac{man,aur} can do it for me. ;)

However I understand your point, and will eventually try to get this feature added in pacman, but as long as pacaur is concerned I just thank you for having implemented the optdep check. :) I’m just adding a comment on the commit regarding the wording.