Add multiple arches and multiple trees for ostree per release
Based on a patch by Dusty Mabe <dusty@dustymabe.com> Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
e4eedd47fc
commit
2ce6013160
1 changed files with 22 additions and 11 deletions
|
@ -24,8 +24,9 @@ RELEASES = {'f27': {'topic': 'fedora',
|
|||
'modules': ['fedora', 'fedora-secondary'],
|
||||
'repos': {'updates': {
|
||||
'from': 'f27-updates',
|
||||
'ostree': {'ref': 'fedora/27/x86_64/updates/atomic-host',
|
||||
'dest': os.path.join(ATOMICDEST, '27')},
|
||||
'ostrees': [{'ref': 'fedora/27/x86_64/updates/atomic-host',
|
||||
'dest': os.path.join(ATOMICDEST, '27'),
|
||||
'arches': ['x86_64', 'ppc64', 'aarch64']}],
|
||||
'to': [{'arches': ['x86_64', 'armhfp', 'source'],
|
||||
'dest': os.path.join(FEDORADEST, '27')},
|
||||
{'arches': ['aarch64', 'i386', 'ppc64', 'ppc64le', 's390x'],
|
||||
|
@ -33,8 +34,9 @@ RELEASES = {'f27': {'topic': 'fedora',
|
|||
]},
|
||||
'updates-testing': {
|
||||
'from': 'f27-updates-testing',
|
||||
'ostree': {'ref': 'fedora/27/x86_64/testing/atomic-host',
|
||||
'dest': os.path.join(ATOMICDEST, '27')},
|
||||
'ostrees': [{'ref': 'fedora/27/%(arch)s/testing/atomic-host',
|
||||
'dest': os.path.join(ATOMICDEST, '27'),
|
||||
'arches': ['x86_64', 'ppc64', 'aarch64']}],
|
||||
'to': [{'arches': ['x86_64', 'armhfp', 'source'],
|
||||
'dest': os.path.join(FEDORADEST, 'testing', '27')},
|
||||
{'arches': ['aarch64', 'i386', 'ppc64', 'ppc64le', 's390x'],
|
||||
|
@ -60,8 +62,8 @@ RELEASES = {'f27': {'topic': 'fedora',
|
|||
'modules': ['fedora', 'fedora-secondary'],
|
||||
'repos': {'updates': {
|
||||
'from': 'f26-updates',
|
||||
'ostree': {'ref': 'fedora/26/x86_64/updates/atomic-host',
|
||||
'dest': os.path.join(ATOMICDEST, '26')},
|
||||
'ostrees': [{'ref': 'fedora/26/x86_64/updates/atomic-host',
|
||||
'dest': os.path.join(ATOMICDEST, '26')}],
|
||||
'to': [{'arches': ['x86_64', 'armhfp', 'source'],
|
||||
'dest': os.path.join(FEDORADEST, '26')},
|
||||
{'arches': ['aarch64', 'i386', 'ppc64', 'ppc64le'],
|
||||
|
@ -69,8 +71,8 @@ RELEASES = {'f27': {'topic': 'fedora',
|
|||
]},
|
||||
'updates-testing': {
|
||||
'from': 'f26-updates-testing',
|
||||
'ostree': {'ref': 'fedora/26/x86_64/testing/atomic-host',
|
||||
'dest': os.path.join(ATOMICDEST, '26')},
|
||||
'ostrees': [{'ref': 'fedora/26/x86_64/testing/atomic-host',
|
||||
'dest': os.path.join(ATOMICDEST, '26')}],
|
||||
'to': [{'arches': ['x86_64', 'armhfp', 'source'],
|
||||
'dest': os.path.join(FEDORADEST, 'testing', '26')},
|
||||
{'arches': ['aarch64', 'i386', 'ppc64', 'ppc64le'],
|
||||
|
@ -299,9 +301,18 @@ def sync_single_release(release):
|
|||
f.write(target)
|
||||
needssync = True
|
||||
|
||||
if 'ostree' in RELEASES[release]['repos'][repo]:
|
||||
ostree = RELEASES[release]['repos'][repo]['ostree']
|
||||
sync_ostree(ostree['dest'], ostree['ref'])
|
||||
for ostree in RELEASES[release]['repos'][repo].get('ostrees', []):
|
||||
pairs = []
|
||||
if 'arches' in ostree:
|
||||
for arch in arches:
|
||||
dest = ostree['dest'] % {'arch': arch}
|
||||
ref = ostree['ref'] % {'arch': arch}
|
||||
pairs.append((dest, ref))
|
||||
else:
|
||||
pairs = [(ostree['dest'], ostree['ref'])]
|
||||
|
||||
for pair in pairs:
|
||||
sync_ostree(*pair)
|
||||
|
||||
return needssync
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue