From 0b916f49e0a881ba3dce55c98e4a35a3e9d9d9f3 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 11 Sep 2024 12:50:25 +0200 Subject: [PATCH] Store the container annotation in the "containers" directory Like the OBS worker does. --- osc/build.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osc/build.py b/osc/build.py index 719e4773..0609ab25 100644 --- a/osc/build.py +++ b/osc/build.py @@ -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)