summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-01-11 17:00:33 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-01-11 17:00:33 +0000
commitaaee88bf4323dc4f29af63dd1b2a99c87c23ffa1 (patch)
tree8d219be1caf25a8a2b021b2d59c8a1474af2c4d5 /morph
parenta41042cd9fd7ee21b2f47406764d650dbb9cea8e (diff)
downloadmorph-aaee88bf4323dc4f29af63dd1b2a99c87c23ffa1.tar.gz
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.
Diffstat (limited to 'morph')
-rwxr-xr-xmorph4
1 files changed, 2 insertions, 2 deletions
diff --git a/morph b/morph
index 742879c5..f557baa9 100755
--- a/morph
+++ b/morph
@@ -79,7 +79,7 @@ class Morph(cliapp.Application):
tempdir = morphlib.tempdir.Tempdir()
builder = morphlib.builder.Builder(tempdir, self)
- if not os.path.exists(self.settings['cachedir']) and os.getuid() != 0:
+ if not os.path.exists(self.settings['cachedir']):
os.mkdir(self.settings['cachedir'])
ret = []
@@ -91,7 +91,7 @@ class Morph(cliapp.Application):
# we may not have permission to tempdir.remove()
ex = morphlib.execute.Execute('.', lambda msg: None)
- ex.runv(["rm", "-rf", tempdir.dirname], as_root=True)
+ ex.runv(["rm", "-rf", tempdir.dirname])
if args:
raise cliapp.AppException('Extra args on command line: %s' % args)