diff options
author | Xavier Chantry <shiningxc@gmail.com> | 2008-04-16 10:13:21 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-05-14 16:15:14 +0200 |
commit | 33e3182dbd1ad9b68f72914abbf4a93a97b0d79b (patch) | |
tree | 9ff5d5f81826d5a8ec83233d06b23813682647fe | |
parent | a8ee1854135f333091337e3dbcb1f96cdb1aab01 (diff) | |
download | pacman-33e3182dbd1ad9b68f72914abbf4a93a97b0d79b.tar.gz pacman-33e3182dbd1ad9b68f72914abbf4a93a97b0d79b.tar.xz |
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>
-rwxr-xr-x | pactest/pmtest.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pactest/pmtest.py b/pactest/pmtest.py index 267eeb2e..e8f6fa8d 100755 --- a/pactest/pmtest.py +++ b/pactest/pmtest.py @@ -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") |