From f5478d68a67741236a2e9f42f2e524ee1bb26517 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 29 Nov 2007 23:39:51 -0600 Subject: Add real scriptlet checking for pactest Due to commit da1222de2e30aabcae9d17bbfa10bbf0672338af, we can now use fakechroot to completely run scriptlet pactests Use "which" functionality so as not to REQUIRE it for all users Signed-off-by: Aaron Griffin Signed-off-by: Dan McGee --- pactest/pmtest.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pactest/pmtest.py') diff --git a/pactest/pmtest.py b/pactest/pmtest.py index 457028db..be36914b 100755 --- a/pactest/pmtest.py +++ b/pactest/pmtest.py @@ -189,6 +189,13 @@ def run(self, pacman): cmd = [""] if os.geteuid() != 0: cmd.append("fakeroot") + + 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 gdb --args") if pacman["valgrind"]: -- cgit v1.2.3-54-g00ecf