From 33e3182dbd1ad9b68f72914abbf4a93a97b0d79b Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Wed, 16 Apr 2008 10:13:21 +0200 Subject: 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 Signed-off-by: Dan McGee --- pactest/pmtest.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'pactest') 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") -- cgit v1.2.3-70-g09d2