1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

Merge branch 'fix_product_builds' of https://github.com/adrianschroeter/osc

Fix counting of obs_repositories:/ in case of a product build. Also, always
pass --signdummy to the build script in case of a product build (otherwise,
the build seems to fail).
This commit is contained in:
Marcus Huewe 2020-02-04 19:29:13 +01:00
commit da68c523b3

View File

@ -1120,12 +1120,16 @@ def main(apiurl, opts, argv):
root = tree.getroot()
# product
if root.find('instsource'):
# leads to unsigned media, but avoids build failure
buildargs.append('--signdummy')
for xml in root.findall('instsource'):
found_obsrepositories = 0
for node in xml.findall('instrepo'):
if node and node.find('source').get('path') == 'obsrepositories:/':
found_obsrepositories = found_obsrepositories + 1
for path in bi.pathes:
found_obsrepositories += 1
new_node = ET.SubElement(xml, 'instrepo')
new_node.set('name', node.get('name') + "_" + str(found_obsrepositories))
new_node.set('priority', node.get('priority'))