Add an error message if the sandbox user account does not exist
I recently ran into an issue when installing updates, where pacman somehow managed to completely uninstall itself. After copying the binaries from another machine, my system was still unable to install any packages due to an "unexpected error." After a few hours of debugging, it turned out that the issue was that the alpm
user had been deleted.
This patch adds an error message that points that out.
Before:
thijs@box:~/code/pacman$ sudo pacman -Sy --noconfirm vim
:: Synchronising package databases...
error: failed to synchronize all databases (unexpected error)
After:
thijs@box:~/code/pacman$ sudo ./pacman -Sy --noconfirm vim
:: Synchronising package databases...
error: could not create temporary download dir: user 'alpm' does not exist
error: failed to synchronize all databases (unexpected error)
Interestingly enough, disabling the sandbox has no effect on this issue:
thijs@box:~/code/pacman$ sudo ./pacman -Sy --noconfirm --disable-sandbox vim
:: Synchronising package databases...
error: could not create temporary download dir: user 'alpm' does not exist
error: failed to synchronize all databases (unexpected error)
Edited by Thijs van Dijk