From aaee88bf4323dc4f29af63dd1b2a99c87c23ffa1 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 11 Jan 2012 17:00:33 +0000 Subject: stop morph from using fakeroot and sudo Instead, assume the whole build will be run, by the user, under fakeroot or sudo (the latter for system image builds). This allows us to run all non-system-image-build tests without root access at all. We now always create the cache directory, if missing, even if we're running as root. We no longer run ldconfig if ld.so.conf is missing. It is missing during our tests, but is (now) created by fhs-dirs for real builds. --- morphlib/bins_tests.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'morphlib/bins_tests.py') diff --git a/morphlib/bins_tests.py b/morphlib/bins_tests.py index 6fe48aa7..8a54033b 100644 --- a/morphlib/bins_tests.py +++ b/morphlib/bins_tests.py @@ -92,8 +92,7 @@ class ChunkTests(unittest.TestCase): morphlib.bins.create_chunk(self.instdir, self.chunk_file, ['.'], self.ex) os.mkdir(self.unpacked) - morphlib.bins.unpack_binary(self.chunk_file, self.unpacked, self.ex, - as_fakeroot=True) + morphlib.bins.unpack_binary(self.chunk_file, self.unpacked, self.ex) self.assertEqual(orig_files, recursive_lstat(self.unpacked)) def test_uses_only_matching_names(self): @@ -127,8 +126,7 @@ class StratumTests(unittest.TestCase): self.populate_instdir() morphlib.bins.create_stratum(self.instdir, self.stratum_file, self.ex) os.mkdir(self.unpacked) - morphlib.bins.unpack_binary(self.stratum_file, self.unpacked, self.ex, - as_fakeroot=True) + morphlib.bins.unpack_binary(self.stratum_file, self.unpacked, self.ex) self.assertEqual(recursive_lstat(self.instdir), recursive_lstat(self.unpacked)) -- cgit v1.2.1