Morganamilo / paru

Feature packed AUR helper
GNU General Public License v3.0
6.16k stars 236 forks source link

`--needed` exits with error when there's new version of package #1137

Open hirak99 opened 7 months ago

hirak99 commented 7 months ago

Affected Version

paru -V: paru v2.0.1 - libalpm v13.0.2

Description

Have you checked previous issues? Yes, didn't see any similar recent issue.

Output

Include the FULL output of any relevant commands/configs

Command: Assume that an installed package, say yabsnap, has an updated version. Then the following downloads the sources but skips making the .zst and fails -

paru -S --needed yabsnap

I also tested it with other packages, e.g. visual-studio-code-bin, and it fails in a similar way.

Don't cut parts of the input always include the FULL thing

paru.conf and pacman.conf are usually always relevant

$ paru -S --needed yabsnap
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (1)      Old Version  New Version    Make Only
aur/yabsnap  2.1.3-1      2.1.4-1        No

:: Proceed to review? [Y/n]: 

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
==> Making package: yabsnap 2.1.4-1 (Fri 16 Feb 2024 09:09:15 PM IST)
==> Retrieving sources...
  -> Found yabsnap-2.1.4.tar.gz
==> Validating source files with md5sums...
    yabsnap-2.1.4.tar.gz ... Passed
==> Making package: yabsnap 2.1.4-1 (Fri 16 Feb 2024 09:09:15 PM IST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found yabsnap-2.1.4.tar.gz
==> Validating source files with md5sums...
    yabsnap-2.1.4.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting yabsnap-2.1.4.tar.gz with bsdtar
==> Sources are ready.
yabsnap-2.1.4-1: parsing pkg list...
:: yabsnap-2.1.4-1 is up to date -- skipping
:: yabsnap-2.1.4-1 is up to date -- skipping build
loading packages...
error: '/home/user1/.cache/paru/clone/yabsnap/yabsnap-2.1.4-1-any.pkg.tar.zst': could not find or read package

Here's the content of the relevant cache directory -

$ ls ~/.cache/paru/clone/yabsnap
PKGBUILD  src  yabsnap-2.1.2-1-any.pkg.tar.zst  yabsnap-2.1.2.tar.gz  yabsnap-2.1.3-1-any.pkg.tar.zst  yabsnap-2.1.3.tar.gz  yabsnap-2.1.4.tar.gz  yabsnap.install

It appears that when --needed is used, and a new version exists, paru downloads the files, but skips building or making the .zst file.

It works if I do not pass --needed.

C0rn3j commented 7 months ago

Duplicate of #1093