Skip to content

Commit 0b916f4

Browse files
committed
Store the container annotation in the "containers" directory
Like the OBS worker does.
1 parent 0302053 commit 0b916f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

osc/build.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ def __init__(self, filename, apiurl, buildtype='spec', localpkgs=None, binarytyp
203203
else:
204204
self.preinstallimage = None
205205

206+
self.containerannotation = root.findtext("containerannotation")
207+
206208
def has_dep(self, name):
207209
for i in self.deps:
208210
if i.name == name:
@@ -1320,6 +1322,12 @@ def __str__(self):
13201322
print("Using prefered package: " + path + "/" + filename)
13211323
os.unlink(tffn)
13221324

1325+
if bi.containerannotation:
1326+
if not os.path.exists("containers"):
1327+
os.makedirs("containers")
1328+
with open("containers/annotation", "wb") as f:
1329+
f.write(bi.containerannotation.encode())
1330+
13231331
if prefer_pkgs:
13241332
localpkgdir = "repos/_local/"
13251333
os.mkdir(localpkgdir)

0 commit comments

Comments
 (0)