summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2018-07-31 12:42:24 +0100
committerTiago Gomes <tiago.gomes@codethink.co.uk>2018-08-02 12:33:17 +0100
commitea9fd3dd85c0fd70eecb2afc1fc55e3a0140b32e (patch)
tree70c6d905e50f868ebf54cce9d4d395cdb369e1e0 /buildstream
parentcdd16ce963a07d826c99c7e0e801ee04bc7a6cf3 (diff)
downloadbuildstream-ea9fd3dd85c0fd70eecb2afc1fc55e3a0140b32e.tar.gz
ostree plugin: validate project paths
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/plugins/sources/ostree.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/buildstream/plugins/sources/ostree.py b/buildstream/plugins/sources/ostree.py
index 94fe5093f..3a841c488 100644
--- a/buildstream/plugins/sources/ostree.py
+++ b/buildstream/plugins/sources/ostree.py
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2016 Codethink Limited
+# Copyright (C) 2018 Codethink Limited
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -16,6 +16,7 @@
#
# Authors:
# Andrew Leeming <andrew.leeming@codethink.co.uk>
+# Tiago Gomes <tiago.gomes@codethink.co.uk>
"""
ostree - stage files from an OSTree repository
@@ -73,9 +74,10 @@ class OSTreeSource(Source):
utils.url_directory_name(self.url))
# (optional) Not all repos are signed. But if they are, get the gpg key
- self.gpg_key = self.node_get_member(node, str, 'gpg-key', None)
self.gpg_key_path = None
- if self.gpg_key is not None:
+ if self.node_get_member(node, str, 'gpg-key', None):
+ self.gpg_key = self.node_get_project_path(node, 'gpg-key',
+ check_is_file=True)
self.gpg_key_path = os.path.join(self.get_project_directory(), self.gpg_key)
# Our OSTree repo handle