From a40356bdeff8e9a5b93cf2b57de039abec57f9e3 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 19 Feb 2020 09:38:37 +0100 Subject: allow PKGEXT to be set from the environment --- src/archbuild.in | 2 +- src/makechrootpkg.in | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/archbuild.in b/src/archbuild.in index e6cf19a..ad7036e 100644 --- a/src/archbuild.in +++ b/src/archbuild.in @@ -54,7 +54,7 @@ while getopts 'hcr:' arg; do esac done -check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME +check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME,PKGEXT # Pass all arguments after -- right to makepkg makechrootpkg_args+=("${@:$OPTIND}") 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" <