diff options
author | Jürg Billeter <j@bitron.ch> | 2019-02-24 12:08:51 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-02-28 12:12:38 +0100 |
commit | 0cf62afbfe8ea5eacbdb41b0cb48290a4fc7fecc (patch) | |
tree | 0875dc3c5d10fc78f198616befeae98c4ca1b0f3 | |
parent | 079139ecec31a16ac2d1cc5a643f977eae185a27 (diff) | |
download | buildstream-0cf62afbfe8ea5eacbdb41b0cb48290a4fc7fecc.tar.gz |
element.py: Use virtual artifact directory to stage dependencies
-rw-r--r-- | buildstream/element.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index cef31417a..c6ff90947 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -662,9 +662,8 @@ class Element(Plugin): self.__assert_cached() with self.timed_activity("Staging {}/{}".format(self.name, self._get_brief_display_key())): - # Get the extracted artifact - artifact_base, _ = self.__extract() - artifact = os.path.join(artifact_base, 'files') + artifact_vdir, _ = self.__get_artifact_directory() + files_vdir = artifact_vdir.descend(['files']) # Hard link it into the staging area # @@ -687,11 +686,11 @@ class Element(Plugin): else: link_filter = split_filter - result = vstagedir.import_files(artifact, filter_callback=link_filter, + result = vstagedir.import_files(files_vdir, filter_callback=link_filter, report_written=True, can_link=True) if update_mtimes: - copy_result = vstagedir.import_files(artifact, filter_callback=copy_filter, + copy_result = vstagedir.import_files(files_vdir, filter_callback=copy_filter, report_written=True, update_mtime=True) result = result.combine(copy_result) |