makechrootpkg: Reset environment for builduser

The gnustep-base package ships a profile.d script that adds
"$HOME/GNUstep/Tools" to the PATH, which breaks when the user changes
and causes meson to exit with a "permission denied" error.
This commit is contained in:
Jan Alexander Steffens (heftig) 2016-10-08 14:41:12 +02:00
parent 9727b684e6
commit 76dec8507e
No known key found for this signature in database
GPG Key ID: A5E9288C4FA415FA
1 changed files with 1 additions and 3 deletions

View File

@ -199,9 +199,7 @@ EOF
# so no global variables
_chrootbuild() {
. /etc/profile
export HOME=/build
cd /startdir
sudo -u builduser makepkg "$@"
sudo -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
}
_chrootnamcap() {