diff --git a/osc/build.py b/osc/build.py index 719e47739..8ffd3c5bf 100644 --- a/osc/build.py +++ b/osc/build.py @@ -203,6 +203,11 @@ def __init__(self, filename, apiurl, buildtype='spec', localpkgs=None, binarytyp else: self.preinstallimage = None + if root.find('containerannotation') is not None: + self.containerannotation = root.find('containerannotation') + else: + self.containerannotation = None + def has_dep(self, name): for i in self.deps: if i.name == name: @@ -1320,6 +1325,12 @@ def __str__(self): print("Using prefered package: " + path + "/" + filename) os.unlink(tffn) + if bi.containerannotation is not None: + 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)