Skip to content

Commit 4ccb00b

Browse files
authored
Merge pull request openSUSE#1626 from mlschroe/master
Store the container annotation in the "containers" directory
2 parents 1196e17 + 0b916f4 commit 4ccb00b

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
@@ -193,6 +193,8 @@ def __init__(self, filename, apiurl, buildtype='spec', localpkgs=None, binarytyp
193193
else:
194194
self.preinstallimage = None
195195

196+
self.containerannotation = root.findtext("containerannotation")
197+
196198
def has_dep(self, name):
197199
for i in self.deps:
198200
if i.name == name:
@@ -1314,6 +1316,12 @@ def __str__(self):
13141316
print("Using prefered package: " + path + "/" + filename)
13151317
os.unlink(tffn)
13161318

1319+
if bi.containerannotation:
1320+
if not os.path.exists("containers"):
1321+
os.makedirs("containers")
1322+
with open("containers/annotation", "wb") as f:
1323+
f.write(bi.containerannotation.encode())
1324+
13171325
if prefer_pkgs:
13181326
localpkgdir = "repos/_local/"
13191327
os.mkdir(localpkgdir)

0 commit comments

Comments
 (0)