summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/makepkg.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 9587756a..c81cd2da 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1457,8 +1457,8 @@ else
mkdir -p "$pkgdir"
cd "$startdir"
- if [ $EUID -eq 0 ]; then
- # if we are root, then we don't need to recall makepkg with fakeroot
+ if [ "$(check_buildenv fakeroot)" != "y" -o $EUID -eq 0 ]; then
+ # if we are root or if fakeroot is not enabled, then we don't use it
if [ "$REPKG" = "1" ]; then
warning "$(gettext "Skipping build.")"
else