From ca230480e2c7afb87308b36ecf087879aa52578c Mon Sep 17 00:00:00 2001 From: Sebastian Nowicki Date: Tue, 27 May 2008 14:00:51 +0800 Subject: [PATCH] Allow and unprivaleged user to create packages without fakeroot If fakeroot was not in BUILD_ENV and the user is not root, makepkg would not allow the user to build the package. BUILD_ENV is now checked to see if fakeroot is enabled. If it is not enabled the package can still be built, but root will not have ownership of files. This is useful when users want to make packages for personal use and don't care about ownership. Closes FS#10450. Signed-off-by: Sebastian Nowicki --- scripts/makepkg.sh.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index cc44c68..d3f8971 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1454,7 +1454,7 @@ else mkdir -p "$pkgdir" cd "$startdir" - if [ $EUID -eq 0 ]; then + if [ "$(check_buildenv fakeroot)" != "y" -o $EUID -eq 0 ]; then # if we are root, then we don't need to recall makepkg with fakeroot if [ "$REPKG" = "1" ]; then warning "$(gettext "Skipping build.")" -- 1.5.5.1