1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-14 00:06:15 +01:00

Store the container annotation in the "containers" directory

Like the OBS worker does.
This commit is contained in:
Michael Schroeder 2024-09-11 12:50:25 +02:00
parent 0302053f41
commit 0b916f49e0
No known key found for this signature in database
GPG Key ID: 6AEFFADDED5BE4F9

View File

@ -203,6 +203,8 @@ class Buildinfo:
else:
self.preinstallimage = None
self.containerannotation = root.findtext("containerannotation")
def has_dep(self, name):
for i in self.deps:
if i.name == name:
@ -1320,6 +1322,12 @@ def main(apiurl, store, opts, argv):
print("Using prefered package: " + path + "/" + filename)
os.unlink(tffn)
if bi.containerannotation:
if not os.path.exists("containers"):
os.makedirs("containers")
with open("containers/annotation", "wb") as f:
f.write(bi.containerannotation.encode())
if prefer_pkgs:
localpkgdir = "repos/_local/"
os.mkdir(localpkgdir)