From b4ee6b65633965bab5f6a79ff06e2ff9767f2090 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Aug 27 2015 22:15:15 +0000 Subject: refine expected_images, add cloud images So my anal instincts kicked in and this makes expected_images meet my usual ludicrously over-engineered standards: it should now be more or less correct for EVERY FEDORA EVER. You can check if Fedora 10 was missing any expected deliverables if you like! This also adds expected Cloud images (for post-F20 releases): for now we're expecting base and Atomic disk images for both Intel arches. This can change on request. --- diff --git a/fedfind/release.py b/fedfind/release.py index 75b3bda..8a3bf92 100644 --- a/fedfind/release.py +++ b/fedfind/release.py @@ -270,9 +270,43 @@ class Release(object): these images does not exist, we ought to be worried. Pretty close to the concept of a 'release blocking' image, but I didn't want to commit to this being exactly that. Must be an - iterable of (payload, imagetype, arch) tuples. + iterable of (payload, imagetype, arch) tuples. Here we list + ones that all releases share; Release classes should start + from this list and add more. For Fedora.next releases (post + F20), we expect KDE and Workstation lives and Cloud base and + atomic disk images. For Fedora 7-20 we expect KDE and Desktop + lives. For releases after ARM became primary (F20+), we expect + a minimal disk image and one desktop disk image; for F20-F22 + it was Xfce, for F23+ it's KDE. + + Getting this historically correct is a bit anal, but if + nothing else this code may serve as some kind of record of + Fedora key deliverables for the future. """ - pass + imgs = list() + intels = (arch.name for arch in fedfind.const.ARCHES if + arch.group == 'intel') + arms = (arch.name for arch in fedfind.const.ARCHES if + arch.group == 'arm') + for arch in intels: + if self.release.lower() == 'rawhide' or int(self.release) > 20: + imgs.append(('kde', 'live', arch)) + imgs.append(('workstation', 'live', arch)) + imgs.append(('cloud base', 'disk', arch)) + imgs.append(('cloud atomic', 'disk', arch)) + elif int(self.release) > 6: + imgs.append(('kde', 'live', arch)) + imgs.append(('desktop', 'live', arch)) + + if self.release.lower() == 'rawhide' or int(self.release) > 19: + for arch in arms: + imgs.append(('minimal', 'disk', arch)) + if self.release.isdigit() and int(self.release) < 23: + imgs.append(('xfce', 'disk', arch)) + else: + imgs.append(('kde', 'disk', arch)) + + return imgs @abc.abstractproperty def koji_done(self): @@ -351,6 +385,7 @@ class Release(object): """ if not self.exists: raise ValueError('Release does not exist!') + logger.debug("expected images: %s", self.expected_images) missing = set() for (payload, imagetype, arch) in self.expected_images: queries = ( @@ -472,24 +507,14 @@ class Nightly(Release): @property def expected_images(self): """See abstract class docstring for information on what this - is. For a nightly release we expect for the Intel arches a - generic boot.iso and Workstation and KDE live images, and for - ARM we expect a minimal and a KDE disk image. For Cloud we - expect, er, FIXME? + is. For a nightly release, beyond the universal images, we + expect a generic boot ISO for Intel arches. """ - imgs = list() + imgs = super(Nightly, self).expected_images intels = (arch.name for arch in fedfind.const.ARCHES if arch.group == 'intel') - arms = (arch.name for arch in fedfind.const.ARCHES if - arch.group == 'arm') for arch in intels: imgs.append(('generic', 'boot', arch)) - imgs.append(('workstation', 'live', arch)) - imgs.append(('kde', 'live', arch)) - for arch in arms: - imgs.append(('minimal', 'disk', arch)) - imgs.append(('kde', 'disk', arch)) - logger.debug("expected images: %s", imgs) return tuple(imgs) @property @@ -801,32 +826,26 @@ class MirrorRelease(Release): @property def expected_images(self): """See abstract class docstring for information on what this - is. Getting this right for all historic releases would be a - bit of a pain, so the stuff here is really only valid for F21+ - - but that's all we're likely to want to check anyway. For - these releases, for the Intel arches we expect a Server DVD - and netinst and Workstation and KDE live images, and for ARM - (after it became a primary arch in F20) we expect a minimal - and a KDE disk image (for F23+) or an Xfce disk image (for - 19: - for arch in arms: - imgs.append(('minimal', 'disk', arch)) - if int(self.release) < 23: - imgs.append(('xfce', 'disk', arch)) - else: - imgs.append(('kde', 'disk', arch)) + if self.release.lower() == 'rawhide' or int(self.release) > 20: + imgs.append(('server', 'netinst', arch)) + imgs.append(('server', 'dvd', arch)) + elif int(self.release) > 1: + imgs.append(('generic', 'boot', arch)) + if int(self.release) > 2: + imgs.append(('generic', 'dvd', arch)) + if int(self.release) < 15: + imgs.append(('generic', 'disc1', arch)) return tuple(imgs) def get_mirror_images(self, prefurl=''):