summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSebastian Nowicki <sebnow@gmail.com>2008-05-27 14:00:51 +0800
committerDan McGee <dan@archlinux.org>2008-05-29 06:37:14 -0500
commitb9369a747d0c2fa3ee8371f99f5ca7acbc89f7f9 (patch)
tree6f76fa359c99247521893b8d3d91caa06eb2e0dd /scripts
parent149839c5391e9a93465f86dbb8d095a0150d755d (diff)
downloadpacman-b9369a747d0c2fa3ee8371f99f5ca7acbc89f7f9.tar.xz
Allow an unprivileged user to create packages without fakeroot
When fakeroot was not in BUILDENV and the user was not root, makepkg still tried to use fakeroot for building packages. BUILDENV 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 <sebnow@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-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