From 50247e57320de74e88049101e1ad47fb8e78b5a3 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Tue, 1 Sep 2015 10:15:36 +0000 Subject: Simplify StagingArea class Pass the Source to the staging area constructor so that we don't need to pass it as a parameter when we call some StagingArea methods. Also move the creation of the build and destdir directories to the constructor so that we can get rid of the chroot_open() and chroot_close() methods. Also, provide API to retrieve the relative locations for buildir and destdir. Change-Id: I6e8085392e19ff3d8df807f260acf90eec9e0901 --- morphlib/plugins/cross-bootstrap_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'morphlib/plugins') diff --git a/morphlib/plugins/cross-bootstrap_plugin.py b/morphlib/plugins/cross-bootstrap_plugin.py index b8da515e..265b273b 100644 --- a/morphlib/plugins/cross-bootstrap_plugin.py +++ b/morphlib/plugins/cross-bootstrap_plugin.py @@ -59,7 +59,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase): with self.build_watch('overall-build'): for system_name, artifact in self.source.artifacts.iteritems(): handle = self.local_artifact_cache.put(artifact) - fs_root = self.staging_area.destdir(self.source) + fs_root = self.staging_area.real_destdir() try: self.unpack_binary_chunks(fs_root) self.unpack_sources(fs_root) @@ -301,7 +301,7 @@ class CrossBootstrapPlugin(cliapp.Plugin): system_artifact.source.cross_sources = cross_sources system_artifact.source.native_sources = native_sources staging_area = build_command.create_staging_area( - build_env, use_chroot=False) + system_artifact.source, build_env, use_chroot=False) builder = BootstrapSystemBuilder( self.app, staging_area, build_command.lac, build_command.rac, system_artifact.source, build_command.lrc, 1, False) -- cgit v1.2.1