urldetect: Drop boot.iso fetching

Since this was only used for the --cdrom $treeurl case, this is
no longer used
This commit is contained in:
Cole Robinson 2018-10-12 15:50:52 -04:00
parent b90b8e3c07
commit 8ff2043f2a
3 changed files with 11 additions and 56 deletions

View File

@ -28,12 +28,11 @@ url = https://dl.fedoraproject.org/pub/fedora/linux/development/29/Server/x86_64
distro = testsuite-fedora-rawhide
# Fedora development, distro will need to be updated regularly.
# Test for xen and boot iso for full fedora coverage
# Test for xen for full fedora coverage
[fedora-rawhide]
url = http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/os/
distro = testsuite-fedora-rawhide
testxen = 1
testbootiso = 1
kernelarg = inst.repo=
@ -68,7 +67,6 @@ distro = centos7.0
url = http://mirrors.mit.edu/centos/7/os/x86_64/
distro = centos7.0
testxen = 1
testbootiso = 1
[centos-7-latest-ppc64le]
url = http://mirror.centos.org/altarch/7/os/ppc64le/
distro = centos7.0
@ -137,11 +135,10 @@ distro = debian9
[debian9-arm64]
url = http://ftp.us.debian.org/debian/dists/stretch/main/installer-arm64/
distro = debian9
# Dialy tree, but also check for xen and boot.iso for full coverage
# Daily tree, but also check for xen for full coverage
[debiandaily]
url = https://d-i.debian.org/daily-images/amd64/
testxen = 1
testbootiso = 1
distro = debiantesting
kernelarg = None
@ -167,11 +164,10 @@ testshortcircuit = 1
url = http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64
distro = ubuntu16.04
# Latest release.
# Check for xen and boot iso for full coverage
# Check for xen for full coverage
[ubuntu17.10]
url = http://us.archive.ubuntu.com/ubuntu/dists/artful/main/installer-amd64
testxen = 1
testbootiso = 1
# No entry in libosinfo yet
#distro = ubuntu17.10

View File

@ -35,7 +35,7 @@ class _URLTestData(object):
Data is stored in test_urls.ini
"""
def __init__(self, name, url, detectdistro,
testxen, testbootiso, testshortcircuit, kernelarg):
testxen, testshortcircuit, kernelarg):
self.name = name
self.url = url
self.detectdistro = detectdistro
@ -44,7 +44,6 @@ class _URLTestData(object):
self.kernelarg = kernelarg
self.testxen = testxen
self.testbootiso = testbootiso
# If True, pass in the expected distro value to getDistroStore
# so it can short circuit the lookup checks. Speeds up the tests
@ -145,8 +144,7 @@ def _sanitize_osdict_name(detectdistro):
def _testURL(fetcher, testdata):
"""
Test that our URL detection logic works for grabbing kernel, xen
kernel, and boot.iso
Test that our URL detection logic works for grabbing kernels
"""
distname = testdata.name
arch = testdata.arch
@ -203,15 +201,6 @@ def _testURL(fetcher, testdata):
return fetcher.hasFile(filename)
fetcher.acquireFile = fakeAcquireFile
# Fetch boot iso
if testdata.testbootiso:
boot = hvmstore.acquireBootISO()
logging.debug("acquireBootISO: %s", str(boot))
if boot is not True:
raise AssertionError("%s-%s: bootiso fetching failed" %
(distname, arch))
# Fetch regular kernel
kernel, initrd, kernelargs = hvmstore.acquireKernel()
if kernel is not True or initrd is not True:
@ -289,7 +278,6 @@ def _make_tests():
d = _URLTestData(name, vals["url"],
vals.get("distro", None),
vals.get("testxen", "0") == "1",
vals.get("testbootiso", "0") == "1",
vals.get("testshortcircuit", "0") == "1",
vals.get("kernelarg", None))
urls[d.name] = d

View File

@ -105,22 +105,13 @@ class _DistroCache(object):
image_type = "xen"
return self.treeinfo.get("images-%s" % image_type, media_name)
kernel_paths = []
boot_iso_paths = []
try:
kernel_paths.append(
(_get_treeinfo_path("kernel"), _get_treeinfo_path("initrd")))
return [(_get_treeinfo_path("kernel"),
_get_treeinfo_path("initrd"))]
except Exception:
logging.debug("Failed to parse treeinfo kernel/initrd",
exc_info=True)
try:
boot_iso_paths.append(_get_treeinfo_path("boot.iso"))
except Exception:
logging.debug("Failed to parse treeinfo boot.iso", exc_info=True)
return kernel_paths, boot_iso_paths
return []
def split_version(self):
verstr = self.treeinfo_version
@ -311,7 +302,6 @@ class Distro(object):
PRETTY_NAME = None
matching_distros = []
_boot_iso_paths = None
_kernel_paths = None
def __init__(self, fetcher, arch, vmtype, cache):
@ -358,13 +348,6 @@ class Distro(object):
os.unlink(kernel)
raise
def acquireBootISO(self):
for path in self._boot_iso_paths:
if self.fetcher.hasFile(path):
return self.fetcher.acquireFile(path)
raise RuntimeError(_("Could not find boot.iso in %s tree." %
self.PRETTY_NAME))
def get_osdict_info(self):
"""
Return detected osdict value
@ -397,9 +380,7 @@ class RedHatDistro(Distro):
def __init__(self, *args, **kwargs):
Distro.__init__(self, *args, **kwargs)
k, b = self.cache.get_treeinfo_media(self.type)
self._kernel_paths = k
self._boot_iso_paths = b
self._kernel_paths = self.cache.get_treeinfo_media(self.type)
def _get_kernel_url_arg(self):
def _is_old_rhdistro():
@ -534,9 +515,7 @@ class SuseDistro(Distro):
if not self.cache.suse_content or self.cache.suse_content == -1:
# This means we matched on treeinfo
k, b = self.cache.get_treeinfo_media(self.type)
self._kernel_paths = k
self._boot_iso_paths = b
self._kernel_paths = self.cache.get_treeinfo_media(self.type)
return
tree_arch = self.cache.suse_content.tree_arch
@ -550,7 +529,6 @@ class SuseDistro(Distro):
oldkern += "64"
oldinit += "64"
self._boot_iso_paths = ["boot/boot.iso"]
self._kernel_paths = []
if self.type == "xen":
# Matches Opensuse > 10.2 and sles 10
@ -733,8 +711,6 @@ class DebianDistro(Distro):
if self.cache.debian_media_type == "daily":
url_prefix = "daily"
self._boot_iso_paths = ["%s/netboot/mini.iso" % url_prefix]
tree_arch = self._find_treearch()
hvmroot = "%s/netboot/%s-installer/%s/" % (url_prefix,
self._debname, tree_arch)
@ -811,7 +787,6 @@ class ALTLinuxDistro(Distro):
PRETTY_NAME = "ALT Linux"
matching_distros = ["altlinux"]
_boot_iso_paths = [("altinst", "live")]
_kernel_paths = [("syslinux/alt0/vmlinuz", "syslinux/alt0/full.cz")]
@classmethod
@ -825,8 +800,6 @@ class MandrivaDistro(Distro):
PRETTY_NAME = "Mandriva/Mageia"
matching_distros = ["mandriva", "mes"]
_boot_iso_paths = ["install/images/boot.iso"]
@classmethod
def is_valid(cls, cache):
return cache.content_regex("VERSION", ".*(Mandriva|Mageia).*")
@ -859,9 +832,7 @@ class GenericTreeinfoDistro(Distro):
def __init__(self, *args, **kwargs):
Distro.__init__(self, *args, **kwargs)
k, b = self.cache.get_treeinfo_media(self.type)
self._kernel_paths = k
self._boot_iso_paths = b
self._kernel_paths = self.cache.get_treeinfo_media(self.type)
# Build list of all *Distro classes