1
0
mirror of https://pagure.io/fedora-qa/createhdds.git synced 2024-11-21 23:03:08 +00:00

Drop handling of obsolete arches, clean up some explanations

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-03-24 08:57:06 -07:00
parent 11dfeeafd9
commit 81e1a18c27

View File

@ -63,9 +63,9 @@ def supported_arches():
"""Provides a list of the arches for which virt-install images can
be built on this host.
"""
powerpc_arches = ['ppc64', 'ppc64le', 'noarch']
intel_arches = ['i686', 'x86_64', 'noarch']
aarch64_arches = ['aarch64', 'armv7l']
powerpc_arches = ['ppc64le', 'noarch']
intel_arches = ['x86_64', 'noarch']
aarch64_arches = ['aarch64']
if CPUARCH in powerpc_arches:
supported_arches = powerpc_arches
elif CPUARCH in intel_arches:
@ -294,14 +294,9 @@ class VirtInstallImage(object):
arch = self.arch
fedoradir = 'fedora/linux'
memsize = '3072'
if arch == 'i686':
arch = 'i386'
if arch in ['ppc64','ppc64le']:
if arch == "ppc64le":
fedoradir = 'fedora-secondary'
memsize = '4096'
if arch == 'i386':
# i686 is in fedora-secondary (until it died)
fedoradir = 'fedora-secondary'
variant = self.variant
# From F31 onwards, Workstation tree is not installable and we
@ -827,23 +822,23 @@ def parse_args(hdds):
imgparser.set_defaults(imggrp=('guestfs', imggrp))
# For virtinstall images, we provide args to override the release/
# arch combination; using args.release will always result in just a
# single image being built, for x86_64 unless args.arch is set to
# i686.
# arch combination; using args.release without args.arch will always
# result in just a single image being built, for x86_64; using
# args.arch without args.release is ignored
for imggrp in hdds['virtinstall']:
imgparser = subparsers.add_parser(
imggrp['name'], description="Create {0} image(s)".format(imggrp['name']))
imgparser.add_argument(
'-r', '--release', help="The release to build the image(s) for. If not "
"set, createhdds will attempt to determine the current release and build "
"for appropriate releases relative to that",
"for appropriate releases relative to that, and will ignore --arch",
default='')
imgparser.add_argument(
'-a', '--arch', help="The arch to build the image(s) for. If neither "
"this nor --release is set, createhdds will decide the appropriate "
"arch(es) to build for each release. If this is not set but --release "
"is set, only x86_64 image(s) will be built.",
choices=('x86_64', 'i686', 'ppc64le', 'aarch64'))
'-a', '--arch', help="The arch to build the image(s) for. Must be set "
"with --release or else it is ignored. If neither this nor --release is set, "
"createhdds will decide the appropriate arch(es) to build for each release. "
"If this is not set but --release is set, only x86_64 image(s) will be built.",
choices=('x86_64', 'ppc64le', 'aarch64'))
imgparser.set_defaults(func=cli_image)
# Here we're stuffing the type of the image and the dict from
# hdds into args for cli_image() to use.