summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-05-08 16:27:45 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-06-12 17:28:34 +0100
commit003ab4ee94c2f770d8b60e25aed33096448689f6 (patch)
tree2f5bec8cb520ea8a19c198e1d5d88df2d22daff8
parent8307b5d98026d75c4e1a0e3faf56e6ea1301f004 (diff)
downloadbuildstream-003ab4ee94c2f770d8b60e25aed33096448689f6.tar.gz
plugins/elements/stack.py: Convert to virtual directories
-rw-r--r--buildstream/plugins/elements/stack.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/buildstream/plugins/elements/stack.py b/buildstream/plugins/elements/stack.py
index 45c49c514..5b237d273 100644
--- a/buildstream/plugins/elements/stack.py
+++ b/buildstream/plugins/elements/stack.py
@@ -24,7 +24,6 @@ Stack elements are simply a symbolic element used for representing
a logical group of elements.
"""
-import os
from buildstream import Element
@@ -52,7 +51,7 @@ class StackElement(Element):
# Just create a dummy empty artifact, its existence is a statement
# that all this stack's dependencies are built.
- rootdir = sandbox.get_directory()
+ vrootdir = sandbox.get_virtual_directory()
# XXX FIXME: This is currently needed because the artifact
# cache wont let us commit an empty artifact.
@@ -61,10 +60,7 @@ class StackElement(Element):
# the actual artifact data in a subdirectory, then we
# will be able to store some additional state in the
# artifact cache, and we can also remove this hack.
- outputdir = os.path.join(rootdir, 'output', 'bst')
-
- # Ensure target directory parent
- os.makedirs(os.path.dirname(outputdir), exist_ok=True)
+ vrootdir.descend(['output', 'bst'], create=True)
# And we're done
return '/output'