summaryrefslogtreecommitdiff
path: root/morphlib/bins.py
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 /morphlib/bins.py
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 'morphlib/bins.py')
-rw-r--r--morphlib/bins.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/morphlib/bins.py b/morphlib/bins.py
index 90d96d82..cd77a037 100644
--- a/morphlib/bins.py
+++ b/morphlib/bins.py
@@ -101,20 +101,16 @@ def create_stratum(rootdir, stratum_filename, ex):
'''Create a stratum from the contents of a directory.'''
logging.debug('Creating stratum file %s from %s' %
(stratum_filename, rootdir))
- ex.runv(['tar', '-C', rootdir, '-caf', stratum_filename, '.'],
- as_fakeroot=True)
+ ex.runv(['tar', '-C', rootdir, '-caf', stratum_filename, '.'])
-def unpack_binary(filename, dirname, ex, as_fakeroot=False, as_root=False):
+def unpack_binary(filename, dirname, ex):
'''Unpack a binary into a directory.
The directory must exist already.
- If the binary will be packed up again by tar with the same Execute
- object then as_fakeroot will suffice
- If it will be creating a system image as_root will be needed
'''
logging.debug('Unpacking %s into %s' % (filename, dirname))
- ex.runv(['tar', '-C', dirname, '-xvf', filename], as_fakeroot=as_fakeroot, as_root=as_root)
+ ex.runv(['tar', '-C', dirname, '-xvf', filename])