Ensure we use the correct remote location when pulling images

develop
Sam Black 1 month ago
parent 73f6df049f
commit c39653f007
Signed by: samwwwblack
GPG Key ID: 0FF0223994EA47D8
  1. 9
      sponson/image/dbus/manager.py
  2. 7
      sponson/image/ostree.py

@ -1,7 +1,7 @@
# coding=utf8
#
# manager: Image manager DBUS services
# Copyright (C) 2017 Sam Black <samwwwblack@lapwing.org>
# Copyright (C) 2017, 2018 Sam Black <samwwwblack@lapwing.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -80,7 +80,7 @@ class Manager(Image):
# Register the object as the latest version as well
_, latest = self.image_repo.version_checksum_latest(
"{}:{}".format(remote, image_name))
"{}:{}".format(remote, image_name), remote)
if version == latest:
# Clear any current "latest" links
self._manager_remove(image_name, "latest", remote)
@ -104,7 +104,7 @@ class Manager(Image):
image_cb.unregister()
_, latest = self.image_repo.version_checksum_latest(
"{}:{}".format(remote, image_name))
"{}:{}".format(remote, image_name), remote)
if latest == version:
self._manager_remove(image_name, "latest", remote)
@ -144,7 +144,8 @@ class Manager(Image):
image_name = image
for csum in checksums:
vers = self.image_repo.checksum_version_find(image, csum)
vers = self.image_repo.checksum_version_find(image, csum,
remote)
self._manager_add(image_name, vers, remote)
return self.images

@ -667,9 +667,12 @@ class OSTRepo(object):
:return: sorted list of checksums and associated commit metadata
:rtype: tuple((checksum, metadata))
"""
if ":" in branch and remote != "local":
remote_check = remote
if ":" in branch and not remote:
remote, remote_branch = branch.split(":")
if remote and remote != "local":
remote_check = remote
remote_branch = branch
csum = self.revision(branch, remote_check)
else:
remote_check = False

Loading…
Cancel
Save