Skip to content

Commit

Permalink
Store the container annotation in the "containers" directory
Browse files Browse the repository at this point in the history
Like the OBS worker does.
  • Loading branch information
mlschroe committed Sep 11, 2024
1 parent 0302053 commit 0b916f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions osc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0b916f4

Please sign in to comment.