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>2020-02-19 09:38:37 +0100
committerErich Eckner <git@eckner.net>2020-02-21 08:27:35 +0100
commitc7df2ce7a23e93c221d97cf772f7a2cdc58b874f (patch)
tree4d876336e339c13166be4e21e6979c5bbd2b0aad /makechrootpkg.in
parentcb6484fe4538e34490a44661d8579c370cccea0b (diff)
allow PKGEXT to be set from the environment
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index dfea18c..61e2f98 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -178,6 +178,9 @@ prepare_chroot() {
grep -q "^$x" "$copydir/etc/makepkg.conf" && continue
echo "$x" >>"$copydir/etc/makepkg.conf"
done
+ if [ -n "${PKGEXT}" ]; then
+ sed -i 's/^PKGEXT=.*/PKGEXT='"'${PKGEXT}'"'/' "$copydir/etc/makepkg.conf"
+ fi
cat > "$copydir/etc/sudoers.d/builduser-pacman" <<EOF
builduser ALL = NOPASSWD: /usr/bin/pacman
@@ -323,9 +326,11 @@ done
umask 0022
ORIG_HOME=$HOME
+ORIG_PKGEXT=$PKGEXT
IFS=: read -r _ _ _ _ _ HOME _ < <(getent passwd "${SUDO_USER:-$USER}")
load_makepkg_config
HOME=$ORIG_HOME
+PKGEXT=$ORIG_PKGEXT
# Use PKGBUILD directory if these don't exist
[[ -d $PKGDEST ]] || PKGDEST=$PWD