summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2013-11-01common: implement find_cached_packageDave Reisner1-0/+69
This function (currently) searches through $PWD and $PKGDEST looking for a tarball matching the requested package name, architecture, and pkgver. If found, it writes the full path to the located package to stdout and returns 0, else 1. If more than 1 match is found, it's treated as an error and the user will need to figure out what to do. Use this in checkpkg and commitpkg, which previously implemented their own less complete logic, to locate the build artifacts they rely on. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-08common: Properly forward arguments from die to errorDave Reisner1-1/+1
Also allow this function to be called without arguments, in which case, don't call error at all. Some uses of this function wrongly assumed that this was already allowed. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-05-03lib/common.sh: Introduce locking helper functionsJan Alexander Steffens (heftig)1-0/+24
Reduces code duplication. With makechrootpkg not calling mkarchroot anymore, the lock handover protocol is unneeded. arch-nspawn does not do any locking, so add protection to archbuild.
2012-10-27Fix return code handlingJan Alexander Steffens (heftig)1-1/+1
Stop trap_exit from forcing a 0 exit code. This fixes makechrootpkg, which used to always return success, even if the build failed. Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-10-03Use dedicated trap functions to avoid unsetting the trap when e.g. cleanup ↵Pierre Schmitz1-4/+12
is called
2012-06-16mkarchroot: reset trap so it wont be called twicePierre Schmitz1-1/+1
2012-02-12archrelease: Validate tags before releasingLukas Fleischer1-0/+20
Compare every single tag with a list of valid tags. This prevents broken releases which occurred whenever someone made a typo on the command line: $ ./archrelease community i686 ==> ERROR: archrelease: Invalid tag: "community" (use -f to force release) Since the list is used in the ZSH completion as well, break it out to a separate file and move it to "lib/". Also, add a command line parameter to allow for releasing to an unknown repository when necessary. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-11-04lib/common.sh: Revise setup_workdir()Lukas Fleischer1-1/+1
* Honor TMPDIR variable (just like we did in commit a0c6bf45). * Quote path properly. * Avoid unnecessary use of basename(1). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-11-04lib/common.sh: Use double bracketsLukas Fleischer1-3/+3
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-11-01Move common functions to a shared filePierre Schmitz1-0/+124
* common.sh is included on build time * most functions are copied from makepkg