1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-24 07:08:53 +02:00

Merge pull request #1626 from mlschroe/master

Store the container annotation in the "containers" directory
This commit is contained in:
2024-10-14 10:09:04 +02:00
committed by GitHub

View File

@@ -193,6 +193,8 @@ class Buildinfo:
else: else:
self.preinstallimage = None self.preinstallimage = None
self.containerannotation = root.findtext("containerannotation")
def has_dep(self, name): def has_dep(self, name):
for i in self.deps: for i in self.deps:
if i.name == name: if i.name == name:
@@ -1314,6 +1316,12 @@ def main(apiurl, store, opts, argv):
print("Using prefered package: " + path + "/" + filename) print("Using prefered package: " + path + "/" + filename)
os.unlink(tffn) 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: if prefer_pkgs:
localpkgdir = "repos/_local/" localpkgdir = "repos/_local/"
os.mkdir(localpkgdir) os.mkdir(localpkgdir)