summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-02-25 07:43:36 +0100
committerJürg Billeter <j@bitron.ch>2019-02-28 12:12:38 +0100
commite7b0710b7ead0b8174663de50c9ffef258788b31 (patch)
tree660be4fee4bc4de4333f2a2b9189db66e55a6dd2
parentbed3b8faa463ebb2de618797b24bc534e674f877 (diff)
downloadbuildstream-e7b0710b7ead0b8174663de50c9ffef258788b31.tar.gz
element.py: Use virtual artifact directory to compute manifest
-rw-r--r--buildstream/element.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index cd32fd39c..1094141e7 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -2644,14 +2644,10 @@ class Element(Plugin):
def __compute_splits(self, include=None, exclude=None, orphans=True):
filter_func = self.__split_filter_func(include=include, exclude=exclude, orphans=orphans)
- artifact_base, _ = self.__extract()
- basedir = os.path.join(artifact_base, 'files')
+ artifact_vdir, _ = self.__get_artifact_directory()
+ files_vdir = artifact_vdir.descend(['files'])
- # FIXME: Instead of listing the paths in an extracted artifact,
- # we should be using a manifest loaded from the artifact
- # metadata.
- #
- element_files = utils.list_relative_paths(basedir)
+ element_files = files_vdir.list_relative_paths()
if not filter_func:
# No splitting requested, just report complete artifact