diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-04-25 12:32:23 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-04-25 12:32:23 +0100 |
commit | 1568eef4a14c8f806268c1b16d646c2e32f5a72e (patch) | |
tree | 8a62733d72e0dbc0fbee7a19a11364e9cd187526 /morph | |
parent | 422cf9cecaf7accbdd00913032123458b2d3d2db (diff) | |
download | morph-1568eef4a14c8f806268c1b16d646c2e32f5a72e.tar.gz |
Setup /proc in staging only if using chroot; install staging-fillers
Diffstat (limited to 'morph')
-rwxr-xr-x | morph | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -224,21 +224,29 @@ class Morph(cliapp.Application): staging_root = '/' staging_temp = tempfile.mkdtemp() install_chunks = True + setup_proc = False elif self.settings['staging-chroot']: staging_root = tempfile.mkdtemp() staging_temp = staging_root install_chunks = True + setup_proc = True else: staging_root = '/' staging_temp = tempfile.mkdtemp() install_chunks = False + setup_proc = False staging_area = morphlib.stagingarea.StagingArea(staging_root, staging_temp) + if self.settings['staging-chroot']: + self._install_initial_staging(staging_area) builder = morphlib.builder2.Builder(staging_area, lac, lrc, build_env, self.settings['max-jobs']) + if setup_proc: + builder.setup_proc = True + for group in order.groups: for artifact in group: if artifact in needed: @@ -265,6 +273,13 @@ class Morph(cliapp.Application): if staging_temp != '/' and os.path.exists(staging_temp): shutil.rmtree(staging_temp) + def _install_initial_staging(self, staging_area): + logging.debug('Pre-populating staging area %s' % staging_area.dirname) + logging.debug('Fillers: %s' % repr(self.settings['staging-filler'])) + for filename in self.settings['staging-filler']: + with open(filename, 'rb') as f: + staging_area.install_artifact(f) + def cmd_show_dependencies(self, args): '''Dumps the dependency tree of all input morphologies.''' |