Now that I’ve been with Arch for a few years, I find myself using the ABS much more frequently to rebuild packages from the repos. The abs(3) script is nice because it now lets you grab a single package from the repos without having to waste space and bandwidth synching the entire abs tree. If you haven’t read up on the ABS yet, I highly encourage you to do so.
The convenience of the abs script has only one drawback that I can see; you specifiy an
$ABSROOT, and packages end up in
$ABSROOT/$REPO. For example if I set
ABSROOT=$HOME/pkgs and run
abs extra/pkgtools, I end up with
$HOME/pkgs/extra/pkgtools. This is a very minor issue but it’s very annoying when you’d like to keep all of your self built packages in one place. I’ve come up with a workaround and I’d like to see if anyone can suggest a better way to accomplish this.
First, create an absroot directory that holds symlinks for all repos abs knows about.
mkdir ~/.absroot cd $_ for i in core extra community testing; do ln -s ~/pkgs $i; done
ABSROOT="$HOME/.absroot" SYNCARGS='-mrtv --no-motd --delete-after --no-p --no-o --no-g --keep-dirlinks'
SYNCARGS are key here. They are default options with the exception of
--keep-dirlinks. Without this setting, rsync will wipe out the symlinks you made above and your packages won’t end up where you expect them.
With these settings, I can now run
abs extra/pkgtools and I will have a
$HOME/pkgs/pkgtools directory amidst all the AUR packages I’ve collected.
If anyone knows an alternative solution, I’d be glad to hear it – I’d also like to know of any major side effects, so let me know what you think.