diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-16 13:09:04 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-16 13:09:39 +0100 |
commit | ec1665b75f646eec5db6078a190dab36096fe213 (patch) | |
tree | f015c2b67cb63e0905a6ead1fe03893eed958e2f /morphlib/stagingarea.py | |
parent | 0569173401faa85d044c77ce9f8b1a247456c878 (diff) | |
download | morph-ec1665b75f646eec5db6078a190dab36096fe213.tar.gz |
Make the tempdir writable in bootstrap mode.
Somehow this was working on x86 even though it had no ability to
write to tempdirs, but on ARM it wasn't working.
Diffstat (limited to 'morphlib/stagingarea.py')
-rw-r--r-- | morphlib/stagingarea.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py index ba6fd53a..3c6d2d88 100644 --- a/morphlib/stagingarea.py +++ b/morphlib/stagingarea.py @@ -287,11 +287,15 @@ class StagingArea(object): cwd = '/' chroot_dir = self.dirname if self.use_chroot else '/' + temp_dir = kwargs["env"].get("TMPDIR", "/tmp") + staging_dirs = [self.builddirname, self.destdirname] + if self.use_chroot: + staging_dirs += ["dev", "proc", temp_dir.lstrip('/')] do_not_mount_dirs = [os.path.join(self.dirname, d) - for d in (self.builddirname, - self.destdirname, - 'dev', 'proc', 'tmp')] + for d in staging_dirs] + if not self.use_chroot: + do_not_mount_dirs += [temp_dir] logging.debug("Not mounting dirs %r" % do_not_mount_dirs) |