Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/makechrootpkg.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-02-19 09:38:37 +0100
committerErich Eckner <git@eckner.net>2022-12-08 12:57:22 +0100
commita40356bdeff8e9a5b93cf2b57de039abec57f9e3 (patch)
treebd415bd24b4d5e7f74e6e3057c261b6be3d57a19 /src/makechrootpkg.in
parenta510331698bb13ca11ccd7db3f9beef75f87744c (diff)
allow PKGEXT to be set from the environment
Diffstat (limited to 'src/makechrootpkg.in')
-rw-r--r--src/makechrootpkg.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/makechrootpkg.in b/src/makechrootpkg.in
index 895c1de..765fc55 100644
--- a/src/makechrootpkg.in
+++ b/src/makechrootpkg.in
@@ -170,6 +170,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
@@ -325,6 +328,7 @@ done
umask 0022
ORIG_HOME=$HOME
+PKGEXT=$PKGEXT
IFS=: read -r _ _ _ _ _ HOME _ < <(getent passwd "${SUDO_USER:-$USER}")
load_makepkg_config
HOME=$ORIG_HOME