1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

pactest: only use fakeroot when it is found.

Only use fakeroot and fakechroot when they are found AND required.
fakechroot only had the first condition, and fakeroot only the second.

When they are required (user != root) but not found, display a warning.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Xavier Chantry 2008-04-16 10:13:21 +02:00 committed by Dan McGee
parent a8ee185413
commit 33e3182dbd

View File

@ -189,13 +189,17 @@ class pmtest:
cmd = [""]
if os.geteuid() != 0:
cmd.append("fakeroot")
fakeroot = which("fakeroot")
if not fakeroot:
print "WARNING: fakeroot not found!"
else:
cmd.append("fakeroot")
fakechroot = which("fakechroot")
if not fakechroot:
print "WARNING: fakechroot not found, scriptlet tests WILL fail!!!"
else:
cmd.append("fakechroot")
fakechroot = which("fakechroot")
if not fakechroot:
print "WARNING: fakechroot not found, scriptlet tests WILL fail!!!"
else:
cmd.append("fakechroot")
if pacman["gdb"]:
cmd.append("libtool execute gdb --args")