[arch-projects] [devtools] [PATCH] Expand check_root keepenv variables

Morten Linderud foxboron at archlinux.org
Mon Jul 23 22:15:27 UTC 2018


From: Morten Linderud <morten at linderud.pw>

makechrootpkg checks the environment for multiple variables before
overwriting them with makepkg.conf configurations. Expand check_root
with the variables makechrootpkg check for so we are capable of
overwriting them when needed.

Signed-off-by: Morten Linderud <foxboron at archlinux.org>
---
 archbuild.in    | 2 +-
 lib/archroot.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/archbuild.in b/archbuild.in
index 1e5b582..6f22b12 100644
--- a/archbuild.in
+++ b/archbuild.in
@@ -39,7 +39,7 @@ while getopts 'hcr:' arg; do
 	esac
 done
 
-check_root SOURCE_DATE_EPOCH
+check_root SOURCE_DATE_EPOCH SRCDEST SRCPKGDEST PKGDEST LOGDEST MAKEFLAGS PACKAGER
 
 # Pass all arguments after -- right to makepkg
 makechrootpkg_args+=("${@:$OPTIND}")
diff --git a/lib/archroot.sh b/lib/archroot.sh
index f279603..82276e2 100644
--- a/lib/archroot.sh
+++ b/lib/archroot.sh
@@ -10,7 +10,7 @@ CHROOT_VERSION='v4'
 ##
 orig_argv=("$0" "$@")
 check_root() {
-	local keepenv=$1
+	local keepenv=$(tr " " "," <<< $@)
 
 	(( EUID == 0 )) && return
 	if type -P sudo >/dev/null; then
-- 
2.18.0


More information about the arch-projects mailing list