mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-03 18:16:17 +01:00
support building for kiwi products using obsrepositories:/
This commit is contained in:
parent
b329b74816
commit
b08bd8a437
1
NEWS
1
NEWS
@ -7,6 +7,7 @@
|
|||||||
* --vm-disk-size= switch supported (has only an effect on clean builds)
|
* --vm-disk-size= switch supported (has only an effect on clean builds)
|
||||||
* repository, architecture and vm_type from last build is automatically
|
* repository, architecture and vm_type from last build is automatically
|
||||||
reused if not specified otherwise.
|
reused if not specified otherwise.
|
||||||
|
* support building for kiwi products using obsrepositories:/
|
||||||
|
|
||||||
0.166.2
|
0.166.2
|
||||||
- Don't enforce password reuse (boo#1156501)
|
- Don't enforce password reuse (boo#1156501)
|
||||||
|
21
osc/build.py
21
osc/build.py
@ -1094,11 +1094,26 @@ def main(apiurl, opts, argv):
|
|||||||
print(open(build_descr).read(), file=sys.stderr)
|
print(open(build_descr).read(), file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
root = tree.getroot()
|
root = tree.getroot()
|
||||||
|
|
||||||
# product
|
# product
|
||||||
for xml in root.findall('instsource'):
|
for xml in root.findall('instsource'):
|
||||||
if xml.find('instrepo').find('source').get('path') == 'obsrepositories:/':
|
found_obsrepositories = 0
|
||||||
print("obsrepositories:/ for product builds is not yet supported in osc!")
|
for node in xml.findall('instrepo'):
|
||||||
sys.exit(1)
|
if node and node.find('source').get('path') == 'obsrepositories:/':
|
||||||
|
found_obsrepositories = found_obsrepositories + 1
|
||||||
|
for path in bi.pathes:
|
||||||
|
new_node = ET.SubElement(xml, 'instrepo')
|
||||||
|
new_node.set('name', node.get('name') + "_" + str(found_obsrepositories))
|
||||||
|
new_node.set('priority', node.get('priority'))
|
||||||
|
new_node.set('local', 'true')
|
||||||
|
new_source_node = ET.SubElement(new_node, 'source')
|
||||||
|
new_source_node.set('path', "obs://" + path)
|
||||||
|
xml.remove(node)
|
||||||
|
|
||||||
|
if found_obsrepositories > 0:
|
||||||
|
build_descr = '_service:' + build_descr.rsplit('/', 1)[-1]
|
||||||
|
tree.write(open(build_descr, 'wb'))
|
||||||
|
|
||||||
# appliance
|
# appliance
|
||||||
expand_obsrepos=None
|
expand_obsrepos=None
|
||||||
for xml in root.findall('repository'):
|
for xml in root.findall('repository'):
|
||||||
|
Loading…
Reference in New Issue
Block a user