Jguer / yay

Yet another Yogurt - An AUR Helper written in Go
GNU General Public License v3.0
10.8k stars 353 forks source link

The dependencies of make depends aren't removed after installing packages #368

Closed Sporif closed 6 years ago

Sporif commented 6 years ago

Affected Version

yay v5.675

Issue

If a make depend for an aur package has dependencies that also need to be installed, they aren't removed when answering y to Remove make dependencies after install?. As a result orphans will be left after the install.

But this is a small issue because it's a simple matter to run yay -c afterwards.

Steps to reproduce

Example package: latte-dock-git

The only make depends not already installed on my system are cmake and extra-cmake-modules. Their dependencies that aren't installed (recursive) are libuv and rhash.

  1. yay -S latte-dock-git
  2. ==> Remove make dependencies after install? [y/N] y

Expect:

[Repo Make: 4]  extra-cmake-modules-5.45.0-1 jsoncpp-1.8.4-2  libuv-1.20.1-1  rhash-1.3.6-1  cmake-3.10.3-1
[Aur: 2]  latte-dock-git-0.7.1.r573.g587d5786-1

After install all the two make depends and their dependencies are removed.

Actually get:

[Repo: 4]  jsoncpp-1.8.4-2  libuv-1.20.1-1  rhash-1.3.6-1  cmake-3.10.3-1
[Repo Make: 1]  extra-cmake-modules-5.45.0-1
[Aur: 2]  latte-dock-git-0.7.1.r573.g587d5786-1

After install only the make depend extra-cmake-modules is removed.

I think cmake not being removed might be a separate but related issue: it seems if a make depend's dependencies includes another make depend (in this case extra-cmake-modules depends on cmake, but cmake is also a make depend) then that make depend (cmake) is not removed.

Morganamilo commented 6 years ago

Yeah seems like you're right, I'll look into it.