The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/distrobuilder/pull/355
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) ===
From 8b158a6a20e9bff2a33bd18594e4d07f52d04229 Mon Sep 17 00:00:00 2001 From: Thomas Hipp <thomas.h...@canonical.com> Date: Mon, 3 Aug 2020 18:06:51 +0200 Subject: [PATCH 1/2] sources/centos: Handle list of multiple images Signed-off-by: Thomas Hipp <thomas.h...@canonical.com> --- sources/centos-http.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/centos-http.go b/sources/centos-http.go index 922378e..e580c92 100644 --- a/sources/centos-http.go +++ b/sources/centos-http.go @@ -407,9 +407,9 @@ func (s CentOSHTTP) getRelease(URL, release, variant, arch string) string { } for _, r := range re { - match := regexp.MustCompile(r).FindString(string(body)) - if match != "" { - return match + matches := regexp.MustCompile(r).FindAllString(string(body), -1) + if len(matches) > 0 { + return matches[len(matches)-1] } } From 8ff8ee0243af178a07c7b1385c99539c5c67fccc Mon Sep 17 00:00:00 2001 From: Thomas Hipp <thomas.h...@canonical.com> Date: Mon, 3 Aug 2020 18:07:14 +0200 Subject: [PATCH 2/2] sources: Fix apertis test Signed-off-by: Thomas Hipp <thomas.h...@canonical.com> --- sources/apertis-http_test.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sources/apertis-http_test.go b/sources/apertis-http_test.go index aa899dc..cd2d0d1 100644 --- a/sources/apertis-http_test.go +++ b/sources/apertis-http_test.go @@ -26,10 +26,6 @@ func TestApertisHTTP_getLatestRelease(t *testing.T) { "18.12", "18.12.0", }, - { - "v2019pre", - "v2019pre.0", - }, } for _, tt := range tests { baseURL := fmt.Sprintf("https://images.apertis.org/release/%s", tt.release)
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel