Store API URL in the revision table

Will be important once we get into SLE
This commit is contained in:
Stephan Kulow
2022-11-06 10:57:32 +01:00
parent f1457e8f8e
commit 5ae02a413d
7 changed files with 31 additions and 17 deletions

View File

@@ -14,11 +14,9 @@ from lib.user import User
class GitExporter:
def __init__(self, api_url, project, package, repodir, cachedir):
self.obs = OBS()
self.obs = OBS(api_url)
self.project = project
self.package = package
# TODO: Store the api url in the revision
self.obs.change_url(api_url)
self.proxy_sha256 = ProxySHA256(self.obs, enabled=True)
self.git = Git(
repodir / package,
@@ -99,6 +97,7 @@ class GitExporter:
)
self.git.add_lfs(file.name, file_sha256["sha256"], size)
else:
self.obs.change_url(flat.commit.api_url)
self.obs.download(
flat.commit.project,
flat.commit.package,