diff --git a/osc/build.py b/osc/build.py index 719e47739..0609ab253 100644 --- a/osc/build.py +++ b/osc/build.py @@ -203,6 +203,8 @@ def __init__(self, filename, apiurl, buildtype='spec', localpkgs=None, binarytyp 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 __str__(self): 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)