summaryrefslogtreecommitdiff
path: root/buildstream/plugins/sources/ostree.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/plugins/sources/ostree.py')
-rw-r--r--buildstream/plugins/sources/ostree.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/buildstream/plugins/sources/ostree.py b/buildstream/plugins/sources/ostree.py
index 6266731bf..526a91aa0 100644
--- a/buildstream/plugins/sources/ostree.py
+++ b/buildstream/plugins/sources/ostree.py
@@ -73,6 +73,12 @@ class OSTreeSource(Source):
self.mirror = os.path.join(self.get_mirror_directory(),
utils.url_directory_name(self.original_url))
+ # At this point we now know if the source has a ref and/or a track.
+ # If it is missing both then we will be unable to track or build.
+ if self.ref is None and self.tracking is None:
+ raise SourceError("{}: OSTree sources require a ref and/or track".format(self),
+ reason="missing-track-and-ref")
+
# (optional) Not all repos are signed. But if they are, get the gpg key
self.gpg_key_path = None
if self.node_get_member(node, str, 'gpg-key', None):