aura icon indicating copy to clipboard operation
aura copied to clipboard

Reinstalling AUR Packages Installed by Another AUR Helper or Installing Previously Removed AUR Package Causes Aura to Fail

Open vodkaa-gal opened this issue 1 year ago • 16 comments

Unsure if this is a supported use case or not, so I'd like to state that I have both Aura and paru installed, as Aura is nicer to use but sometimes just doesn't work.

Using aura-bin from the AUR. I can install new packages just fine, however previously installed packages give an error similar to this:

aura >>= Building gradience...
loading packages...
warning: gradience-0.4.1_patch1-1 is up to date -- reinstalling
error: '/var/cache/pacman/pkg/gradience-debug-0.4.1_patch1-1-x86_64.pkg.tar.zst': could not find or read package

I have a theory that this is caused by installing a package that was already up to date when downloaded with a different AUR helper. I use paru and since it stores its package cache in a different location Aura isn't sure where to find the package, only that it is in fact downloaded. Is it possible to have Aura check if the package exists in Aura's cache, and if it doesn't then have it downloaded? I get it's extra disk usage, but having Aura just not work for those packages until they're updated can be annoying.

vodkaa-gal avatar Mar 28 '24 06:03 vodkaa-gal

Thanks for the report. Would you be willing to double-check if the same issue occurs when using the in-development Aura 4 beta? Here's how you'd install it:

cargo install aura-pm --version 4.0.0-beta01

This assumes that you have cargo installed (likely through rustup), and you'd have to add ~/.cargo/bin to your PATH. There isn't yet a beta package on the AUR, but I will put one together soon.

fosskers avatar Mar 28 '24 08:03 fosskers

The problem remains:

==> Finished making: gradience 0.4.1_patch1-1 (Tue 02 Apr 2024 09:46:49 PM MDT)
mv: cannot stat '/home/aeon/.cache/aura/builds/gradience/gradience-debug-0.4.1_patch1-1-x86_64.pkg.tar.zst': No such file or directory
aura :: Package failed to build, citing:

  Failed to move: /home/aeon/.cache/aura/builds/gradience/gradience-debug-0.4.1_patch1-1-x86_64.pkg.tar.zst

aura :: Action cancelled.

Additionally, does the beta get built using this repo? If so, I'll just switch to using aura-git instead of aura-bin.

vodkaa-gal avatar Apr 03 '24 03:04 vodkaa-gal

The aura-git package does not yet track the Rust build. I have all of that work slated for June.

fosskers avatar Apr 03 '24 04:04 fosskers

Can you provide me that specific command you're using to build the package that's failing? I'd like to try reproducing on my end.

fosskers avatar Apr 03 '24 04:04 fosskers

aura -A gradience.

vodkaa-gal avatar Apr 03 '24 06:04 vodkaa-gal

I'm looking into it.

fosskers avatar Apr 03 '24 09:04 fosskers

I was able to build it just now with the Aura 4 beta, although I had to make some improvements regarding checkdeps to deal with some of the Python packages.

It was able to successfully build it within builds and copy the artifact to cache as you can see here:

> aura -Cs grad
/home/colin/.cache/aura/cache/gradience-0.4.1_patch1-1-x86_64.pkg.tar.zst

We can see that the error is a complaint from mv. Can you navigate into the build directory for gradience and tell me what you see there?

fosskers avatar Apr 04 '24 02:04 fosskers

I see this:

> /home/aeon/.cache/aura/builds/gradience/
0.4.1-patch1.tar.gz
pkg
PKGBUILD
src
xdg-config.install

However, now I get this error when trying to install it using aura -Ayu gradience:

==> Starting build()...
+ exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_pie=true -D python.bytecompile=1 Gradience-0.4.1-patch1 build
Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
Run "meson setup --reconfigure to force Meson to regenerate.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.

ERROR: Unknown options: "b_pie"
==> ERROR: A failure occurred in build().
    Aborting...
aura :: Package failed to build, citing:

  makepkg failed.

aura :: Action cancelled.

I'm really not sure what's going on here, as it's several different errors and there doesn't seem to be consistency between attempts on different days.

vodkaa-gal avatar Apr 04 '24 21:04 vodkaa-gal

I saw this too during my tests. It appears that within the build process, meson doesn't want configure ran more than once. To fix this:

> cd ~/.cache/aura/builds
> rm -rf gradience/

Then run the build command again.

fosskers avatar Apr 05 '24 00:04 fosskers

That seems to have fixed that problem, though the move error still exists.

vodkaa-gal avatar Apr 05 '24 07:04 vodkaa-gal

It used to a problem that the compression algorithm used to finalise built packages (thus producting a.pkg.tar.zst file, etc.) wasn't being respected if the user had changed it within their /etc/makepkg.pkg. However, that's supposed to be fixed via checking the output of makepkg --packagelist after running the build. This produces a list of package tarballs to copy over to the "cache".

Can you go into /home/aeon/.cache/aura/builds/gradience/ and run makepkg --packagelist and paste the output here?

fosskers avatar Apr 08 '24 00:04 fosskers

Here's the output:

makepkg --packagelist
/home/aeon/.cache/aura/builds/gradience/gradience-0.4.1_patch1-1-x86_64.pkg.tar.zst
/home/aeon/.cache/aura/builds/gradience/gradience-debug-0.4.1_patch1-1-x86_64.pkg.tar.zst

vodkaa-gal avatar Apr 09 '24 03:04 vodkaa-gal

Given that there are two pkg files, we know that this is a "split package".

Just checking: did you manually alter the PKGBUILD in anyway, perhaps with --hotedit?

fosskers avatar Apr 09 '24 06:04 fosskers

I just ran the build again, and it only produces the non-debug version for me, and I can only see the one tarball copied into the cache. Let's check if your build process is somehow producing a second package file. Although I'm not sure why it would, since the PKGBUILD itself is quite straight-forward: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gradience

fosskers avatar Apr 09 '24 06:04 fosskers

I haven't modified the PKGBUILD. I just cloned the git repo, but it seems determined to make both of them:

makepkg --packagelist
/home/aeon/projects/gradience/gradience/gradience-0.4.1_patch1-1-x86_64.pkg.tar.zst
/home/aeon/projects/gradience/gradience/gradience-debug-0.4.1_patch1-1-x86_64.pkg.tar.zst

makepkg -si still installs it correctly, but Gradience won't stop building its debug version no matter what I do.

vodkaa-gal avatar Apr 09 '24 07:04 vodkaa-gal

> aura -Aw gradience
aura :: Cloning gradience...
aura :: Done.
> cd gradience/
> makepkg --packagelist
/home/colin/code/aur/gradience/gradience-0.4.1_patch1-1-x86_64.pkg.tar.zst

What does the OPTIONS field of your /etc/makepkg.conf look like? Here's mine:

OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)

Note the !debug.

fosskers avatar Apr 10 '24 01:04 fosskers

This has been fixed on master. Thank you for you patience.

fosskers avatar Jun 27 '24 20:06 fosskers