aura
                                
                                 aura copied to clipboard
                                
                                    aura copied to clipboard
                            
                            
                            
                        Don't prompt to continue when there's only one package
Summary
Aura fails if package is already built, i.e. makepkg returns an error:
==> ERROR: A package has already been built. (use -f to overwrite)
Description
Yet another abnormal situation I ran into. I just tried to do a "cold reinstall" by completely removing and installing fresh version of *-git package, maybe because I don't know any better (faster) way to resolve file mismatches (pacman -Qkk).
❯ sudo aura -A zsh-theme-powerlevel10k-git
aura >>= Determining dependencies...
aura >>= AUR Packages:
zsh-theme-powerlevel10k-git
aura >>= Continue? [Y/n] 
aura >>= Building zsh-theme-powerlevel10k-git...
aura >>= Building failed. Would you like to see the error? [Y/n] Y
    powerlevel10k ... Skipped
Reset branch 'makepkg'
==> ERROR: A package has already been built. (use -f to overwrite)
aura >>= There was a makepkg failure.
aura >>= Would you like to continue anyway? [Y/n] Y
aura >>= Every package failed to build.
❯ aura -Qi zsh-theme-powerlevel10k-git
error: package 'zsh-theme-powerlevel10k-git' was not found
Anyways, installation failed for a pretty dumb reason. And now my system apparently is in such a state where I can no longer install this package.
Guess what? use -f to ovewrite is a lie.
❯ sudo aura -A -f zsh-theme-powerlevel10k-git
Invalid option `-f'
Did you mean one of these?
...
And guess what [x2]? Answering "Yes" to the "continue anyway" is a cake. And we all know what the cake is.
Expected behavior
Rebuild ~communism~ package by force!
Actual behavior
- Aura: builds a package
- Also aura: unable to reuse a package built few minutes ago.
- Proceeds to blame the user, like if any of that was my fault.
Workaround
Locate aura's vcspath directory (check out /etc/aura.conf), and trash the built package. Suboptimal, but works.
❯ cd /var/cache/aura/vcs/zsh-theme-powerlevel10k-git/zsh-theme-powerlevel10k-git
❯ rm -i *.tar.*
rm: remove regular file 'zsh-theme-powerlevel10k-git-r3773.31ede3c-1-any.pkg.tar.zst'? y
rm: remove regular file 'zsh-theme-powerlevel10k-git-r3799.2c3bcd8-1-any.pkg.tar.zst'? y
rm: remove regular file 'zsh-theme-powerlevel10k-git-r3801.1d99a0b-1-any.pkg.tar.zst'? y
❯ sudo aura -A zsh-theme-powerlevel10k-git
aura >>= Determining dependencies...
aura >>= AUR Packages:
zsh-theme-powerlevel10k-git
aura >>= Continue? [Y/n] 
aura >>= Building zsh-theme-powerlevel10k-git...
loading packages...
resolving dependencies...
looking for conflicting packages...
Packages (1) zsh-theme-powerlevel10k-git-r3801.1d99a0b-1
Total Installed Size:  4.35 MiB
:: Proceed with installation? [Y/n] 
...
Version
aura-bin: 3.2.2-1
In the meantime you can try the --force option, that should force a complete rebuild, and pass -f to makepkg. (The error you saw mentioning -f was in fact from makepkg, not Aura)
A good discovery here is that Would you like to continue? should not appear if only one package was being built.
It's a dual-edged sword, you see.
On one hand, as an Arch Linux user, I should be experienced enough to recognize makepkg message (which I obviously did). It is only natural that suggestion from one command does not apply to completely another.
But on the other hand, in the absence of any other suggestions/instructions from aura, it could be easily confused and blindly applied — only to find out that it does not work at all.
And as a "regular user"™ who is too dumb & lazy to think about any of that, people may ended up in an awkward situation, where they had to manually intervene and do AUR helper's job to restore their system's operability.
I admit it, the whole bug report for solely for the Portal Cake joke.
Heh. For now, does --force fix it?
Lemme see...
❯ sudo aura -A zsh-theme-powerlevel10k-git
aura >>= Determining dependencies...
aura >>= AUR Packages:
zsh-theme-powerlevel10k-git
aura >>= Continue? [Y/n] Y
aura >>= Building zsh-theme-powerlevel10k-git...
loading packages...
resolving dependencies...
looking for conflicting packages...
Packages (1) zsh-theme-powerlevel10k-git-r3803.c14fe96-1
Total Installed Size:  4.36 MiB
Net Upgrade Size:      0.00 MiB
:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                 [---------------------------------------------] 100%
(1/1) checking package integrity                                               [---------------------------------------------] 100%
(1/1) loading package files                                                    [---------------------------------------------] 100%
(1/1) checking for file conflicts                                              [---------------------------------------------] 100%
(1/1) checking available disk space                                            [---------------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 1576
:: Processing package changes...
(1/1) upgrading zsh-theme-powerlevel10k-git                                    [---------------------------------------------] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Removing unnecessary cached files (keeping the latest two)…
removed '/var/cache/pacman/pkg/zsh-theme-powerlevel10k-git-r3799.2c3bcd8-1-any.pkg.tar.zst'
==> finished: 1 packages removed (disk space saved: 1.51 MiB)
(3/3) Performing snapper post snapshots for the following configurations...
==> root: 1577
❯ 
❯ sudo aura -A zsh-theme-powerlevel10k-git
aura >>= Determining dependencies...
aura >>= AUR Packages:
zsh-theme-powerlevel10k-git
aura >>= Continue? [Y/n] Y
aura >>= Building zsh-theme-powerlevel10k-git...
aura >>= Building failed. Would you like to see the error? [Y/n] Y
    powerlevel10k ... Skipped
Reset branch 'makepkg'
==> ERROR: A package has already been built. (use -f to overwrite)
aura >>= There was a makepkg failure.
aura >>= Would you like to continue anyway? [Y/n] Y
aura >>= Every package failed to build.
❯ 
❯ sudo aura -A --force zsh-theme-powerlevel10k-git
aura >>= Determining dependencies...
aura >>= AUR Packages:
zsh-theme-powerlevel10k-git
aura >>= Continue? [Y/n] Y
aura >>= Building zsh-theme-powerlevel10k-git...
loading packages...
warning: zsh-theme-powerlevel10k-git-r3803.c14fe96-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) zsh-theme-powerlevel10k-git-r3803.c14fe96-1
Total Installed Size:  4.36 MiB
Net Upgrade Size:      0.00 MiB
:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring                                                 [---------------------------------------------] 100%
(1/1) checking package integrity                                               [---------------------------------------------] 100%
(1/1) loading package files                                                    [---------------------------------------------] 100%
(1/1) checking for file conflicts                                              [---------------------------------------------] 100%
(1/1) checking available disk space                                            [---------------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 1578
:: Processing package changes...
(1/1) reinstalling zsh-theme-powerlevel10k-git                                 [---------------------------------------------] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Removing unnecessary cached files (keeping the latest two)…
==> no candidate packages found for pruning
(3/3) Performing snapper post snapshots for the following configurations...
==> root: 1579
❯ 
Yeah, looks like it does.
((Dear GitHub, ansi-colored text when))
This error strikes again, so I had to recall that I already reported something similar, find this issue, and loop up the solution. This is highly unnecessary. Such errors shouldn't happen. This is a warning, at best, but definitely not an error that fails your build.
By the way, this time I was trying to set up Xorg from git, to test their fix for recent crashes.
❯ sudo aura -Ax xorg-server-git xorg-server-common-git xorg-server-devel-git xf86-video-intel-git
aura >>= Determining dependencies...
aura >>= AUR Packages:
xf86-video-intel-git
xorg-server-git
aura >>= Continue? [Y/n] y
aura >>= Building xf86-video-intel-git...
==> Making package: xf86-video-intel-git 1:2.99.917+909+g5ca3ac1a-1 (Sat 05 Feb 2022 10:42:40 PM MSK)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating xf86-video-intel git repo...
Fetching origin
==> Validating source files with sha256sums...
    xf86-video-intel ... Skipped
==> Extracting sources...
  -> Creating working copy of xf86-video-intel git repo...
Reset branch 'makepkg'
==> Starting prepare()...
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal -I m4
autoreconf: running: /usr/bin/autoconf
configure.ac:44: warning: The macro `AC_PROG_CC_C99' is obsolete.
configure.ac:44: You should run autoupdate.
./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
aclocal.m4:1899: XORG_COMPILER_BRAND is expanded from...
aclocal.m4:2018: XORG_COMPILER_FLAGS is expanded from...
aclocal.m4:2190: XORG_DEFAULT_OPTIONS is expanded from...
configure.ac:44: the top level
configure.ac:62: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:62: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:62: the top level
configure.ac:218: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:218: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
configure.ac:218: the top level
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
autoreconf: Leaving directory '.'
==> Starting pkgver()...
==> Updated version: xf86-video-intel-git 1:2.99.917+916+g31486f40-1
==> ERROR: A package has already been built. (use -f to overwrite)
aura >>= There was a makepkg failure.
aura >>= Would you like to continue anyway? [Y/n] y
aura >>= Every package failed to build.
And with --force flag it started rebuilding the stuff that is has already built.
And then, again, aura installs packages which no one asked it to:
loading packages...
resolving dependencies...
looking for conflicting packages...
:: xorg-server-git and xorg-server are in conflict. Remove xorg-server? [y/N] y
:: xorg-server-common-git and xorg-server-common are in conflict. Remove xorg-server-common? [y/N] y
:: xorg-server-devel-git and xorg-server-devel are in conflict. Remove xorg-server-devel? [y/N] y
Packages (9) xorg-server-21.1.3-1 [removal]  xorg-server-common-21.1.3-1 [removal]  xorg-server-devel-21.1.3-1 [removal]
             xorg-server-common-git-21.0.99.1.r165.g4c03b67d3-1  xorg-server-devel-git-21.0.99.1.r165.g4c03b67d3-1
             xorg-server-git-21.0.99.1.r165.g4c03b67d3-1  xorg-server-xephyr-git-21.0.99.1.r165.g4c03b67d3-1
             xorg-server-xnest-git-21.0.99.1.r165.g4c03b67d3-1  xorg-server-xvfb-git-21.0.99.1.r165.g4c03b67d3-1
Total Installed Size:  53.62 MiB
Net Upgrade Size:      48.60 MiB
:: Proceed with installation? [Y/n] y
Let's deal with both of these issues in earnest once I've completed -A in the Rust port, which I'm actually quite close to.
While I'm at it I have a UI suggestion:
:: xf86-video-intel-git and xf86-video-intel are in conflict. Remove xf86-video-intel? [y/N]  
When one new package clearly replaces another via same provides and conflicts, the message should be changed from "Remove…?" to a less scary "Replace…?"
I believe that's coming from Pacman.