Closed jeroenrnl closed 7 years ago
In the meantime, instead of deleting that DB, you should be able to apacman
run with the --nodatabase
option or uncomment nodatabase='1'
in apacman.conf
But yeah I'll take a look at it later today.
@jeroenrnl I cannot seem to reproduce this issue on a fresh install of ArchLinux.
Can you provide more information?
Also for debugging, try bash -x /usr/bin/apacman -S <pkg>; echo $?
I probably should have added that this was on the first run, where apacman installs itself by running
bash /tmp/apacman --gendb --skipcache --quiet --noconfirm -S apacman
@jeroenrnl
Okay, yeah pkgfile
is an optional dependency, so apacman
now checks if it is installed (also checks if /var/cache/pkgfile
directory exists), otherwise it skips updating the local DB.
However, unless you add --nodatabase
(or nodatabase='1'
in the config), it will still grab the packages.gz
file from AUR which is used for regex matching (soon to be replaced with glob syntax).
Additionally, to improve debugging, I've modified the exit codes to follow this (see man 8 apacman
)
# | Exit Code Meaning |
---|---|
0 | Success |
1 | Miscellaneous errors |
2 | Invalid parameters |
3 | Fatal errors, not warnings |
4 | No package matches found |
5 | Package does not exist |
6 | No internet connection |
7 | --- |
8 | One or more package(s) failed to build, keep going |
9 | One package failed to build, do not continue |
10 | Permission problem -- fakeroot |
11 | Permission problem -- root user |
12 | Permission problem -- sudo |
13 | Permission problem -- su |
This line (660)
causes apacman to exit with status 1 - which causes my script to fail. Initially it failed because
/var/cache/pkgfile
did not exist. I modified my script to create it - which made it run correctly with the first run, but then on the second run, it failed again, now because/var/cache/pkgfile/aur.files
already exists. The2>/dev/null
made this very hard to troubleshoot. In all above cases the packages in question were installed without a problem - it just exited with status 1, in my opinion it should not exit with another status than 0 on success. For now, my script deletes/var/cache/pkgfile/aur.files
before running - which makes it work, but does defy the purpose of a cache :smile: