Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-31 20:37:42 +0200
committerErich Eckner <git@eckner.net>2018-05-29 09:02:49 +0200
commitab3b8d7830382d0ec461e72b30523732acf57800 (patch)
treed3ab313e2e50d61cae235b386e61faf62886f887 /makechrootpkg.in
parent088f089b7374aa1b47394bd39cac10d83c11d5c0 (diff)
remove empty tree if "--verifysource" failed
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in10
1 files changed, 3 insertions, 7 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 4ee87f2..dafd290 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -244,18 +244,14 @@ download_sources() {
local copydir=$1
local makepkg_user=$2
- local builddir
- builddir="$(mktemp -d)"
- chown "$makepkg_user:" "$builddir"
+ setup_workdir
+ chown "$makepkg_user:" "$WORKDIR"
# Ensure sources are downloaded
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
- env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \
+ env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o ||
die "Could not download sources."
-
- # Clean up garbage from verifysource
- rm -rf "$builddir"
}
# Usage: move_products $copydir $owner