From b55b7e94622dd039d00b6e21b5d28d44ab944693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 21 May 2020 17:41:18 +0200 Subject: [PATCH] urldetect: Deal with ubuntu 20.04 legacy installer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ubuntu 20.04 has a new installer, which is yet not supported by virt-install / osinfo-db, and this made ubuntu switch their URLs for the old installer to current/legacy-images/... instead of current/images/... Let's adapt URL detect so it can deal with this new "legacy" style. Reviewed-by: Cole Robinson Signed-off-by: Fabiano FidĂȘncio --- tests/data/test_urls.ini | 7 ++++++- virtinst/install/urldetect.py | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/data/test_urls.ini b/tests/data/test_urls.ini index dc3e148b..184ca7b8 100644 --- a/tests/data/test_urls.ini +++ b/tests/data/test_urls.ini @@ -177,12 +177,17 @@ testshortcircuit = 1 [ubuntu16.04] url = http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64 distro = ubuntu16.04 -# Latest release. # Check for xen for full coverage [ubuntu19.04] url = http://us.archive.ubuntu.com/ubuntu/dists/disco/main/installer-amd64 testxen = 1 distro = ubuntu19.04 +# Latest release. +# Check for legacy-images for full coverage +[ubuntu20.04] +url = http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64 +kernelregex = current/legacy-images/netboot/ubuntu-installer/.* +distro = ubuntu20.04 diff --git a/virtinst/install/urldetect.py b/virtinst/install/urldetect.py index 12cec1b9..c64ab6ed 100644 --- a/virtinst/install/urldetect.py +++ b/virtinst/install/urldetect.py @@ -648,6 +648,8 @@ class _DebianDistro(_DistroTree): media_type = None if check_manifest("current/images/MANIFEST"): media_type = "url" + elif check_manifest("current/legacy-images/MANIFEST"): + media_type = "legacy_url" elif check_manifest("daily/MANIFEST"): media_type = "daily" elif cache.content_regex(".disk/info", @@ -705,6 +707,8 @@ class _DebianDistro(_DistroTree): url_prefix = "daily" elif self.cache.debian_media_type == "mounted_iso_url": url_prefix = "install" + elif self.cache.debian_media_type == "legacy_url": + url_prefix = "current/legacy-images" tree_arch = self._find_treearch() hvmroot = "%s/netboot/%s-installer/%s/" % (url_prefix,