makechrootpkg: keep *DEST, MAKEFLAGS & PACKAGER

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.
This commit is contained in:
Matt Robinson 2019-03-16 11:29:59 +00:00 committed by Levente Polyak
parent d9b7350448
commit 155798b8b1
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 1 additions and 1 deletions

View File

@ -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")