summaryrefslogtreecommitdiffstats
path: root/scripts/libmakepkg
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2019-01-04 06:26:28 +0100
committerAllan McRae <allan@archlinux.org>2019-01-10 04:25:12 +0100
commit238fa4af4507c573ae4d478d1d7e176429d2c5c5 (patch)
treee379db681eda89649788c9d0e23b14e887cfae0f /scripts/libmakepkg
parent268b0255fa2dd6ccef2e4fa08859c7966002e15a (diff)
downloadpacman-238fa4af4507c573ae4d478d1d7e176429d2c5c5.tar.gz
pacman-238fa4af4507c573ae4d478d1d7e176429d2c5c5.tar.xz
makepkg: fix broken check for the fakeroot binary
In commit d8ee8d0c99c3820951e2e49dbdb71a5390bd1dc4 we made use of fakeroot absolutely mandatory, and disabled a lot of the code which checked to see if this now-defunct BUILDENV option was set, before setting up the environment to use fakeroot. Unfortunately, we missed one spot. The check_software routine still checked to see if fakeroot was enabled, but due to the option being removed, thought that it was in fact disabled, and as a result this check would never run. Fix by checking to see if we are trying to build either a package or a source package, and if so, checking for fakeroot. These are the only two situations where fakeroot is needed. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg')
-rw-r--r--scripts/libmakepkg/executable/fakeroot.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/libmakepkg/executable/fakeroot.sh.in b/scripts/libmakepkg/executable/fakeroot.sh.in
index 56c1b3fd..09064543 100644
--- a/scripts/libmakepkg/executable/fakeroot.sh.in
+++ b/scripts/libmakepkg/executable/fakeroot.sh.in
@@ -28,7 +28,7 @@ source "$LIBRARY/util/option.sh"
executable_functions+=('executable_fakeroot')
executable_fakeroot() {
- if check_buildenv "fakeroot" "y" && (( EUID > 0 )); then
+ if (( SOURCEONLY || BUILDPKG )); then
if ! type -p fakeroot >/dev/null; then
error "$(gettext "Cannot find the %s binary.")" "fakeroot"
return 1