mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
- sync appliance building using obsrepositories with bs_worker code
This commit is contained in:
parent
420f61cdca
commit
bdc772ef10
27
osc/build.py
27
osc/build.py
@ -833,10 +833,15 @@ def main(apiurl, opts, argv):
|
||||
print("obsrepositories:/ for product builds is not yet supported in osc!")
|
||||
sys.exit(1)
|
||||
# appliance
|
||||
expand_obsrepos=None
|
||||
for xml in root.findall('repository'):
|
||||
if xml.find('source').get('path') == 'obsrepositories:/':
|
||||
expand_obsrepos=True
|
||||
if expand_obsrepos:
|
||||
buildargs.append('--kiwi-parameter')
|
||||
buildargs.append('--ignore-repos')
|
||||
for xml in root.findall('repository'):
|
||||
if xml.find('source').get('path') == 'obsrepositories:/':
|
||||
for path in bi.pathes:
|
||||
if not os.path.isdir("repos/"+path):
|
||||
continue
|
||||
@ -848,7 +853,27 @@ def main(apiurl, opts, argv):
|
||||
buildargs.append('--add-repotype')
|
||||
buildargs.append('--kiwi-parameter')
|
||||
buildargs.append('rpm-md')
|
||||
break
|
||||
if xml.get('priority'):
|
||||
buildargs.append('--kiwi-parameter')
|
||||
buildargs.append('--add-repoprio='+xml.get('priority'))
|
||||
else:
|
||||
m = re.match(r"obs://[^/]+/([^/]+)/(\S+)", xml.find('source').get('path'))
|
||||
if not m:
|
||||
# short path without obs instance name
|
||||
m = re.match(r"obs://([^/]+)/(.+)", xml.find('source').get('path'))
|
||||
project=m.group(1).replace(":",":/")
|
||||
repo=m.group(2)
|
||||
buildargs.append('--kiwi-parameter')
|
||||
buildargs.append('--add-repo')
|
||||
buildargs.append('--kiwi-parameter')
|
||||
buildargs.append("repos/"+project+"/"+repo)
|
||||
buildargs.append('--kiwi-parameter')
|
||||
buildargs.append('--add-repotype')
|
||||
buildargs.append('--kiwi-parameter')
|
||||
buildargs.append('rpm-md')
|
||||
if xml.get('priority'):
|
||||
buildargs.append('--kiwi-parameter')
|
||||
buildargs.append('--add-repopriority='+xml.get('priority'))
|
||||
|
||||
if vm_type == "xen" or vm_type == "kvm" or vm_type == "lxc":
|
||||
print('Skipping verification of package signatures due to secure VM build')
|
||||
|
Loading…
Reference in New Issue
Block a user