summaryrefslogtreecommitdiff
path: root/buildstream/element.py
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-05-02 18:24:33 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-08-01 13:07:32 +0100
commit6aedc57be2b7ba704e69a58dfd9922f8c0c6e771 (patch)
tree7af43fe0387e48f25f35283037524db6fc0f9277 /buildstream/element.py
parentd10e4668e79155c406fbe726be9458261083f3d7 (diff)
downloadbuildstream-6aedc57be2b7ba704e69a58dfd9922f8c0c6e771.tar.gz
Add BST_VIRTUAL_DIRECTORY flag for element plugins
Diffstat (limited to 'buildstream/element.py')
-rw-r--r--buildstream/element.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 4260d32a5..08e0767b2 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -195,6 +195,13 @@ class Element(Plugin):
*Since: 1.2*
"""
+ BST_VIRTUAL_DIRECTORY = False
+ """Whether to raise exceptions if an element uses Sandbox.get_directory
+ instead of Sandbox.get_virtual_directory.
+
+ *Since: 1.2*
+ """
+
def __init__(self, context, project, artifacts, meta, plugin_conf):
self.__cache_key_dict = None # Dict for cache key calculation
@@ -2126,7 +2133,8 @@ class Element(Plugin):
directory,
stdout=stdout,
stderr=stderr,
- config=config)
+ config=config,
+ allow_real_directory=not self.BST_VIRTUAL_DIRECTORY)
yield sandbox
else: