Jguer / yay

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

Does yay support VCS package version handling? #2210

Closed TurnOffNOD closed 1 year ago

TurnOffNOD commented 1 year ago

Affected Version

$ yay -V
yay v12.0.5.r15.g12282fb - libalpm v13.0.2

Describe the bug

When I upgrade installed aur packages with yay -Syuu, it will say some packages that is already latest version should upgrade, output as follows:

:: 8 packages to upgrade/install.
8  aur/ffmpeg-intel-full-git    6.1.r110808.g62d4110a64-1 -> 6.1.r110779.g82278e8749-1
7  aur/lensfun-git              0.3.2.r2657.g16db4045-1   -> 0.3.2.r2592.gec9412d2-1
6  aur/libklvanc-git            r553.87d9525-1            -> r434.d474cfc-1
5  aur/liquid-dsp-git           v1.5.0.r70.g41507de1-1    -> v1.3.1.r134.gdd3facf8-1
4  (This package is detected upgrade correctly)
3  (This package's PKGBUILD has bugs, not a yay problem)
2  aur/uavs3d-git               1.1.r47.g1fd0491-1        -> 1.1.r40.g818a0cb-1
1  aur/yay-git                  12.0.5.r15.g12282fb-1     -> 12.0.5.r0.g9641d2a-1
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems

As we can see, yay detect them "upgrade" to a older version number.

However, these packages are already latest version. If I choose to upgrade them, yay will generate the same version as installed version.

I am using yay-git to show it:

warning: yay-git-12.0.5.r15.g12282fb-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)  Old Version            New Version            Net Change

yay-git      12.0.5.r15.g12282fb-1  12.0.5.r15.g12282fb-1    0.00 MiB

Total Installed Size:  9.05 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 

Reproduction Steps

  1. Install some affected packages in daily use.
  2. Upgrade aur packages with yay -Syuu
  3. Look at the output.

Expected behavior

Up-to-date VCS packages should not be shown.

Output

yay -Pg output:

$ yay -Pg
{
        "aururl": "https://aur.archlinux.org",
        "aurrpcurl": "https://aur.archlinux.org/rpc?",
        "buildDir": "/home/ashes/.cache/yay",
        "editor": "",
        "editorflags": "",
        "makepkgbin": "makepkg",
        "makepkgconf": "",
        "pacmanbin": "pacman",
        "pacmanconf": "/etc/pacman.conf",
        "redownload": "no",
        "answerclean": "",
        "answerdiff": "",
        "answeredit": "",
        "answerupgrade": "",
        "gitbin": "git",
        "gpgbin": "gpg",
        "gpgflags": "",
        "mflags": "",
        "sortby": "votes",
        "searchby": "name-desc",
        "gitflags": "",
        "removemake": "ask",
        "sudobin": "sudo",
        "sudoflags": "",
        "version": "12.0.5",
        "requestsplitn": 150,
        "completionrefreshtime": 7,
        "maxconcurrentdownloads": 0,
        "bottomup": true,
        "sudoloop": false,
        "timeupdate": false,
        "devel": true,
        "cleanAfter": false,
        "provides": true,
        "pgpfetch": true,
        "cleanmenu": true,
        "diffmenu": true,
        "editmenu": false,
        "combinedupgrade": true,
        "useask": false,
        "batchinstall": false,
        "singlelineresults": false,
        "separatesources": true,
        "debug": false,
        "rpc": true,
        "doubleconfirm": true,
        "rebuild": "no"
}
Jguer commented 1 year ago

Hey @TurnOffNOD you're using yay -Syuu, -uu means upgrades and downgrades, the official version stored in the AUR is indeed 12.0.5.r0.g9641d2a-1 which is why it's proposed when you ask for a downgrade (the fact that it then builds an up to date version is a peculiarity of -git packages.

Try using yay -Syu for upgrades if you don't want to be proposed older AUR results