Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yay attempts to install net-new AUR package for dependencies when dependency is already satisfied #2157

Closed
eyanulis opened this issue May 11, 2023 · 1 comment · Fixed by #2169
Labels
Status: Confirmed Bug has been verified Type: Bug

Comments

@eyanulis
Copy link

eyanulis commented May 11, 2023

Affected Version

yay v12.0.4.r21.g490ebe4 - libalpm v13.0.2
Also affects the v12.0.4 release tag, without the behavioral inconsistency - i.e. v12.0.4 always tries to install ceph-libs. Will explain in further detail below.

Describe the bug

In AUR, ceph is distributed as:

ceph-bin provides ceph, and ceph-libs-bin provides ceph-libs.

I have the -bin variants installed, since the compilation time of the source variants is very long.

Both ceph-bin and ceph-libs-bin have recently been upgraded from 17.2.5-6 to 17.2.6-1. It should be sufficient to upgrade both of these packages in place to satisfy all dependencies.

However, yay v12.0.4 (i.e. the non-git release of yay) incorrectly attempts to install the ceph-libs source package as a dependency. This behavior is consistent:

[eyanulis@crimson ~]$ yay
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Searching AUR for updates...
:: Searching databases for updates...
:: 3 Packages to upgrade/install.
3  aur/ceph-bin       17.2.5-6 -> 17.2.6-1
2  aur/ceph-libs               -> 17.2.6-1
1  aur/ceph-libs-bin  17.2.5-6 -> 17.2.6-1
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==> ^C

I tested yay-git to see if #2147 might help here (since the behavior seems kinda similar to #2135). However, with yay-git v12.0.4.r21.g490ebe4 the behavior gets stranger: consecutive runs of yay sometimes do try to install ceph-libs, and sometimes do not try to install ceph-libs. Condensed output below; full --debug output will be attached.

[eyanulis@crimson ~]$ date && yay 
Thu May 11 04:54:40 PM MDT 2023
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Searching AUR for updates...
:: Searching databases for updates...
:: 2 packages to upgrade/install.
2  aur/ceph-bin       17.2.5-6 -> 17.2.6-1
1  aur/ceph-libs-bin  17.2.5-6 -> 17.2.6-1
==> packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==> ^C
[eyanulis@crimson ~]$ 
[eyanulis@crimson ~]$ date && yay 
Thu May 11 04:54:45 PM MDT 2023
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Searching AUR for updates...
:: Searching databases for updates...
:: 1 dependency will also be installed for this operation
   aur/ceph-libs   -> 17.2.6-1

:: 2 packages to upgrade/install.
2  aur/ceph-bin       17.2.5-6 -> 17.2.6-1
1  aur/ceph-libs-bin  17.2.5-6 -> 17.2.6-1
==> packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==> ^C
[eyanulis@crimson ~]$ 
[eyanulis@crimson ~]$ date && yay 
Thu May 11 04:54:54 PM MDT 2023
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Searching AUR for updates...
:: Searching databases for updates...
:: 2 packages to upgrade/install.
2  aur/ceph-bin       17.2.5-6 -> 17.2.6-1
1  aur/ceph-libs-bin  17.2.5-6 -> 17.2.6-1
==> packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==> ^C

I cannot identify a pattern any more specific than "sometimes it gets the dependency wrong, sometimes it gets it right". I hesitate to claim the behavior is non-deterministic, but it "feels" that way.

Reproduction Steps

  1. Have ceph-bin 17.2.5-6 and ceph-libs-bin 17.2.5-6 installed.
  2. Execute yay (implied yay -Syu) which will identify that both packages can be upgraded to 17.2.6-1.
    3a. On yay v12.0.4, observe that yay (seemingly) always tries to install ceph-libs as a net-new package.
    3b. On yay-git v12.0.4.r21.g490ebe4, observe that yay intermittently/inconsistently tries to install ceph-libs as a net-new package.

Expected behavior

ceph-libs should not be installed, because this dependency is already satisfied by the installed package ceph-libs-bin.

Output

Note: These were captured with yay --debug -a to limit operations to AUR-only. Behavior still occurs without -a flag.
yay-config.txt
debug-output-wrong.txt
debug-output-good.txt

@Jguer
Copy link
Owner

Jguer commented May 15, 2023

Hey, thanks for reporting this, I haven't verified but I think it makes sense

The TODO in #2135 should fix this, just haven't been able to find the time to implement it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Confirmed Bug has been verified Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants