Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KineticAeon opened this issue Mar 28, 2024 · 16 comments

Comments

@KineticAeon
Copy link

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.

@KineticAeon KineticAeon changed the title Reinstalling AUR Packages or Installing Previously Removed AUR Package Causes Aura to Fail Reinstalling AUR Packages Installed by Another AUR Helper or Installing Previously Removed AUR Package Causes Aura to Fail Mar 28, 2024
@fosskers
Copy link
Owner

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.

@KineticAeon
Copy link
Author

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.

@fosskers
Copy link
Owner

fosskers commented Apr 3, 2024

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

@fosskers
Copy link
Owner

fosskers commented Apr 3, 2024

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.

@KineticAeon
Copy link
Author

aura -A gradience.

@fosskers
Copy link
Owner

fosskers commented Apr 3, 2024

I'm looking into it.

@fosskers
Copy link
Owner

fosskers commented Apr 4, 2024

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?

@KineticAeon
Copy link
Author

KineticAeon commented Apr 4, 2024

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.

@fosskers
Copy link
Owner

fosskers commented Apr 5, 2024

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.

@KineticAeon
Copy link
Author

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

@fosskers
Copy link
Owner

fosskers commented Apr 8, 2024

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?

@KineticAeon
Copy link
Author

KineticAeon commented Apr 9, 2024

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

@fosskers
Copy link
Owner

fosskers commented Apr 9, 2024

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
Copy link
Owner

fosskers commented Apr 9, 2024

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

@KineticAeon
Copy link
Author

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.

@fosskers
Copy link
Owner

fosskers commented Apr 10, 2024

> 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants