Skip to content

Commit

Permalink
Merge pull request #1626 from mlschroe/master
Browse files Browse the repository at this point in the history
Store the container annotation in the "containers" directory
  • Loading branch information
dmach authored Oct 14, 2024
2 parents 1196e17 + 0b916f4 commit 4ccb00b
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 @@ -193,6 +193,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 @@ -1314,6 +1316,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 4ccb00b

Please sign in to comment.