Morganamilo / paru

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

paru aborts installation of aur package due to missing older version in aur repo #1220

Open RubenKelevra opened 4 months ago

RubenKelevra commented 4 months ago

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** ```sh [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** ```sh [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 ```
RubenKelevra commented 4 months ago

The current workaround for me is, to run paru -Ld ladybird-git and then recompile the package, which is kinda frustrating.

RubenKelevra commented 3 months ago

@Morganamilo is this software still supported?

Morganamilo commented 1 week ago

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.

Morganamilo commented 1 week ago

Actually paru uses current_exe() for this so path shouldn't come into it. So unsure what it could be without debug logs.