diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-08-08 14:20:12 +0100 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-08-08 14:47:09 +0100 |
commit | 1908747cd18c79606d7c34d5ff7dfd8176de3928 (patch) | |
tree | b7b676553aa223ab27b4bc6ab7347daddc007211 | |
parent | 7befbcadbb6bf042135d2a8b28ad2a7994b6a738 (diff) | |
download | buildstream-jonathan/ostree-fix-no-upstream.tar.gz |
Fix ostree source failing to fetch when upstream is absentjonathan/ostree-fix-no-upstream
-rw-r--r-- | buildstream/_ostree.py | 8 | ||||
-rw-r--r-- | buildstream/plugins/sources/ostree.py | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py index 5a4039f2f..8e5559053 100644 --- a/buildstream/_ostree.py +++ b/buildstream/_ostree.py @@ -258,7 +258,13 @@ def configure_remote(repo, remote, url, key_url=None): try: repo.remote_change(None, # Optional OSTree.Sysroot - OSTree.RepoRemoteChange.ADD_IF_NOT_EXISTS, + OSTree.RepoRemoteChange.DELETE_IF_EXISTS, + remote, # Remote name + url, # Remote url + options, # Remote options + None) # Optional Gio.Cancellable + repo.remote_change(None, # Optional OSTree.Sysroot + OSTree.RepoRemoteChange.ADD, remote, # Remote name url, # Remote url options, # Remote options diff --git a/buildstream/plugins/sources/ostree.py b/buildstream/plugins/sources/ostree.py index 3a841c488..0285c6f56 100644 --- a/buildstream/plugins/sources/ostree.py +++ b/buildstream/plugins/sources/ostree.py @@ -71,7 +71,7 @@ class OSTreeSource(Source): self.ref = self.node_get_member(node, str, 'ref', None) self.tracking = self.node_get_member(node, str, 'track', None) self.mirror = os.path.join(self.get_mirror_directory(), - utils.url_directory_name(self.url)) + utils.url_directory_name(self.original_url)) # (optional) Not all repos are signed. But if they are, get the gpg key self.gpg_key_path = None |