From d87bafb15e25646e80e993938d569d831f11affe Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 4 Sep 2017 16:06:44 -0700 Subject: [PATCH] Bit more rejigging, fix i386 secondary case Broke the i386 secondary case with the previous rejig (by moving where we fix i686 to be i386). This fixes that and again makes readability better. --- createhdds.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/createhdds.py b/createhdds.py index 2f45fee..7cca0b4 100755 --- a/createhdds.py +++ b/createhdds.py @@ -250,15 +250,16 @@ class VirtInstallImage(object): tmpfile = "{0}.tmp".format(self.filename) arch = self.arch - fedoradir = '' + fedoradir = 'fedora/linux' + memsize = '2048' if arch == 'i686': arch = 'i386' if arch in ['ppc64','ppc64le']: fedoradir = 'fedora-secondary' memsize = '4096' - else: - fedoradir = 'fedora/linux' - memsize = '2048' + if arch == 'i386' and (self.release.lower() == 'rawhide' or int(self.release) > 25): + # from F26 onwards, i686 is in fedora-secondary + fedoradir = 'fedora-secondary' variant = self.variant # For F26, the installer images in the Workstation tree seem to be @@ -278,9 +279,6 @@ class VirtInstallImage(object): loctmp = "https://dl.fedoraproject.org/pub/{0}/development/{0}/{1}/{2}/os/" else: loctmp = "https://download.fedoraproject.org/pub/{0}/releases/{1}/{2}/{3}/os/" - if arch == 'i686' and int(self.release) > 25: - # from F26 onwards, i686 is in fedora-secondary - fedoradir = 'fedora-secondary' xargs = "inst.ks=file:/{0}.ks".format(self.name) args = ["virt-install", "--disk", "size={0},path={1}".format(self.size, tmpfile), "--os-variant", shortid, "-x", xargs, "--initrd-inject",