paru aborts installation of aur package due to missing older version in aur repo
Affected Version
paru v2.0.3 - libalpm v14.0.0
Description
Somehow paru thinks pretty often on my system, that certain older versions should be in the local aur repo, but aren't.
Instead of ignoring this fact, it aborts the installation of the newly compiled package, as it stumbles over the missing file of the older version.
I think it should just silently ignore this and add the new version to the repo.
Output
==> Creating package "ladybird-git"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: ladybird-git r62717.ba56cb6e515-1 (Sun Jul 21 16:12:19 2024)
[INFO] Extracting aur.db.tar.gz to a temporary location...
[INFO] Extracting aur.files.tar.gz to a temporary location...
[INFO] Adding package '/var/lib/repo/aur/ladybird-git-r62717.ba56cb6e515-1-x86_64.pkg.tar.zst'
[INFO] Computing checksums...
[INFO] Removing existing entry 'ladybird-git-r62696.69da6a0ce40-1'...
[INFO] Creating 'desc' db entry...
[INFO] Creating 'files' db entry...
[INFO] Removing old package file 'ladybird-git-r62696.69da6a0ce40-1-x86_64.pkg.tar.zst'
thread 'main' panicked at src/main.rs:372:71:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Could not add packages to repo:
paru now expects local repos to be writable as your user:
You should chown/chmod your repos to be writable by you:
chown -R ruben: /var/lib/repo/aur
error: failed to run: repo-add -R /var/lib/repo/aur/aur.db.tar.gz /var/lib/repo/aur/ladybird-git-r62717.ba56cb6e515-1-x86_64.pkg.tar.zst:
Config files
paru.conf
[options]
PgpFetch
Devel
Provides
DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg -fossil
BottomUp
RemoveMake
SudoLoop
UseAsk
SaveChanges
CombinedUpgrade
CleanAfter
UpgradeMenu
NewsOnUpgrade
LocalRepo
Chroot = /var/lib/paru/aur_chroot
pacman.conf
[options]
CacheDir = /var/cache/pacman/pkg/
CacheDir = /var/lib/repo/aur
HoldPkg = pacman glibc
Architecture = auto
Color
ILoveCandy
VerbosePkgLists
ParallelDownloads = 10
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
[cachyos-v4]
Include = /etc/pacman.d/cachyos-v4-mirrorlist
[cachyos-core-v4]
Include = /etc/pacman.d/cachyos-v4-mirrorlist
[cachyos-extra-v4]
Include = /etc/pacman.d/cachyos-v4-mirrorlist
[cachyos]
Include = /etc/pacman.d/cachyos-mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[multilib]
Include = /etc/pacman.d/mirrorlist
[aur]
SigLevel = PackageOptional DatabaseOptional
Server = file:///var/lib/repo/aur
The current workaround for me is, to run paru -Ld ladybird-git and then recompile the package, which is kinda frustrating.
@Morganamilo is this software still supported?
I'm catching back up on issues.
This is a weird one. I don't think it's anything to do with removing old packages. The Removing old package file comes from repo-add and should work just fine. What's even weirder is paru hasn't had any significant amount of code in main.rs for a long time so the error message makes no sense.
After adding a package to a repo paru then refreshes the repo. Paru needs to be root to do this so it execs itself as root with sudo paru -Ly. My guess is you have an older version of paru somewhere in your path that doesn't get picked normally but under sudo it does.
Though even then I'm not sure why the final error complains about the repo add call. Maybe there's also something off with the error printing there making the perfect storm.
Running this again with RUST_BACKTRACE=1 PARU_DEBUG=1 will give more information on what's happening.
Actually paru uses current_exe() for this so path shouldn't come into it. So unsure what it could be without debug logs.
Looking at this again I realise the repo-add output is not that of repo add:
morganamilo@starlight master ~git/paru % repo-add -R a/a.db.tar.gz ~/pkg/asp-8-1-any.pkg.tar.zst
==> Extracting a.db.tar.gz to a temporary location...
==> Extracting a.files.tar.gz to a temporary location...
==> Adding package '/home/morganamilo/pkg/asp-8-1-any.pkg.tar.zst'
==> WARNING: A newer version for 'asp' is already present in database
-> Computing checksums...
-> Removing existing entry 'asp-8-2'...
-> Creating 'desc' db entry...
-> Creating 'files' db entry...
-> Removing old package file 'asp-8-2-any.pkg.tar.zst'
==> Creating updated database file 'a/a.db.tar.gz'
It looks like you're using some rust re-implementation of repo-add? Which is panicking, leading to the panic message that looks like it could have come from paru. I'm not sure what else would cause the output of repo-add to be different.