rmarquis / pacaur

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

dependency status changed when using -Syuw #228

Closed rmarquis closed 10 years ago

rmarquis commented 10 years ago

Reported on the AUR page:

pacaur did something funny:

$ pacaur -Suwy
[... lots of output ...]
==> Finished making: pacaur 4.1.29-1 (Fri May 16 08:42:03 ART 2014)
:: pacaur cleaned
:: pacaur is a new orphan package
$

Why is it a new orphan? It was explicitly installed, and all I did was tell pacaur to download-but-don't-install new packages.

rmarquis commented 10 years ago

Interesting: after -Sw, the pacaur package actually appears in the pacman -Qdt list, because the install reason is now set "Installed as a dependency for another package". The new orphan code works actually correctly, it only made this underlying bug more visible.

This bug has been introduced in 779d2a724b4a852b611172ef053e71331f623004 in October 2011(!).

Obviously, the reason seems the AUR deps are set to '--deps' so they could be removed automatically when using -w, similarly to binary dependencies when using makepkg -sr. They are compiled and installed in the first place to ensure the main package can be compiled, but it seems I never took into account situations when older versions of the AUR dependencies have already been installed on the system in an explicit manner.

Possible fix: when using -w, check if the package is already installed before setting up the install reason, or don't set up the reason manually at all if not required.

rmarquis commented 10 years ago

Fixed in a939640678dd4539a5de5a6be26a88f1c5f8c846. Setting the install reason manually seems useless.