From: Matt Robinson <g...@nerdoftheherd.com>

If makechrootpkg is called as non-root, the {SRC,SRCPKG,PKG,LOG}DEST,
MAKEFLAGS and PACKAGER environment variables are lost in the call to
check_root().

Add these to the passed keepenv list so that they are preserved instead.
---
 makechrootpkg.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/makechrootpkg.in b/makechrootpkg.in
index 4b72a36..dc647b3 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -341,7 +341,7 @@ main() {
        [[ -n $makepkg_user && -z $(id -u "$makepkg_user") ]] && die 'Invalid 
makepkg user.'
        makepkg_user=${makepkg_user:-${SUDO_USER:-$USER}}
 
-       check_root SOURCE_DATE_EPOCH,GNUPGHOME
+       check_root 
SOURCE_DATE_EPOCH,GNUPGHOME,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER
 
        # Canonicalize chrootdir, getting rid of trailing /
        chrootdir=$(readlink -e "$passeddir")
-- 
2.21.0

Reply via email to