Jguer / yay

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

yay can ask the same "multiple providers" question and doesn't show for which package #2290

Open Porkepix opened 1 year ago

Porkepix commented 1 year ago

Affected Version

yay v12.1.3.r2.g299aa1e - libalpm v13.0.2

Describe the bug

When updating with dependencies not installed required, if it's provided by multiple package, yay asks which package we want to use to provide this. If several packages are in the need of the same dependency, yay will ask the same question multiple times, and will do so without telling for which package it's currently asking.

Reproduction Steps

  1. Run yay -Syu with multiple packages needing the same dependencies with different providers

Expected behavior

This should either ask once and assume the answer would be the same for all packages, or specify on each question for which package is it, in case user wants different providers for different packages.

Output

-->

$ yay -Syu
:: Synchronizing package databases...
 core is up to date
 extra                                                                                                                                                                 8.2 MiB  9.11 MiB/s 00:01 [########################################################################################################################] 100%
 multilib is up to date
:: Searching AUR for updates...
:: Checking development packages...
:: There are 2 providers available for cargo:
:: Repository extra
    1) rust 2) rustup

Enter a number (default=1):
==>
:: There are 2 providers available for cargo:
:: Repository extra
    1) rust 2) rustup

Enter a number (default=1):
==>
:: There are 2 providers available for cargo:
:: Repository extra
    1) rust 2) rustup

Enter a number (default=1):
==>
Juneezee commented 10 months ago

@Porkepix I am unable to reproduce this bug on yay v12.2.0 - libalpm v13.0.2. It would be helpful if you could provide the list of packages that can reproduce this bug.

Porkepix commented 10 months ago

@Porkepix I am unable to reproduce this bug on yay v12.2.0 - libalpm v13.0.2. It would be helpful if you could provide the list of packages that can reproduce this bug.

I don't have packages at hand exactly, but I'd say pick a couple of AUR PKGBUILDS and install old version of some rust-based software that needs to be compiled (normal non-bin version or -git versions), such as bottom, broot, xcp, dust, lsd, procs, zoxide and so on.

You'd need 2 or more of them in outdated versions where yay wants to updated them, AND the initial setup with build dependencies removed after install (rust & rustup needs to be missing from the computer when yay wants to update those packages, for example)

Note that this could be reproduced with packages with other build dependencies where

It just so happens it's with rust-based formulas for me.

Also note that this is also a little bit related to https://github.com/Jguer/yay/issues/2073 I discovered and subscribed to.