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:
parent
a8ee185413
commit
33e3182dbd
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user