--needed option is only adhered to by pacman, not yay #1552
Closed
Description
Affected Version
yay v10.2.3 - libalpm v13.0.0
Describe the bug
When using the --needed
flag pacman will only install the listed packages if a newer version is available. Yay honours this for the repository packages, but for AUR packages it will download, build the package and then try to install it with pacman --needed
resulting in a no-op, but only after building every chosen AUR package
Reproduction Steps
yay -S --needed spotify
- Spotify will be downloaded and built in to a package even when it is already installed.
Expected behavior
When the currently installed package and version available are equal, the package is not installed
Output
╰─ yay -S --needed --noconfirm spotify
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] spotify-1:1.1.56.595-1
1 spotify (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: PKGBUILD up to date, Skipping (1/1): spotify
1 spotify (Installed) (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: spotify
==> Making package: spotify 1:1.1.56.595-1 (Wed 14 Jul 2021 12:06:19 PM AEST)
==> Retrieving sources...
-> Found spotify.protocol
-> Found LICENSE
-> Found spotify-1.1.56.595-x86_64.deb
-> Found spotify-1.1.56.595-Release
-> Found spotify-1.1.56.595-Release.sig
-> Found spotify-1.1.56.595-x86_64-Packages
==> Validating source files with sha512sums...
spotify.protocol ... Passed
LICENSE ... Passed
spotify-1.1.56.595-x86_64.deb ... Passed
spotify-1.1.56.595-Release ... Skipped
spotify-1.1.56.595-Release.sig ... Skipped
spotify-1.1.56.595-x86_64-Packages ... Skipped
==> Verifying source file signatures with gpg...
spotify-1.1.56.595-Release ... Passed
==> Making package: spotify 1:1.1.56.595-1 (Wed 14 Jul 2021 12:06:21 PM AEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found spotify.protocol
-> Found LICENSE
-> Found spotify-1.1.56.595-x86_64.deb
-> Found spotify-1.1.56.595-Release
-> Found spotify-1.1.56.595-Release.sig
-> Found spotify-1.1.56.595-x86_64-Packages
==> Validating source files with sha512sums...
spotify.protocol ... Passed
LICENSE ... Passed
spotify-1.1.56.595-x86_64.deb ... Passed
spotify-1.1.56.595-Release ... Skipped
spotify-1.1.56.595-Release.sig ... Skipped
spotify-1.1.56.595-x86_64-Packages ... Skipped
==> Verifying source file signatures with gpg...
spotify-1.1.56.595-Release ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting spotify-1.1.56.595-x86_64.deb with bsdtar
==> Starting prepare()...
spotify-1.1.56.595-x86_64-Packages: OK
spotify-1.1.56.595-x86_64.deb: OK
==> Sources are ready.
==> Making package: spotify 1:1.1.56.595-1 (Wed 14 Jul 2021 12:06:24 PM AEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Sources are ready.
spotify-1:1.1.56.595-1 is up to date -- skipping