[lxc-devel] [distrobuilder/master] sources/opensuse: Fix x86 tarballs

monstermunchkin on Github lxc-bot at linuxcontainers.org
Mon Jun 15 15:01:41 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 310 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200615/1ddd3861/attachment.bin>
-------------- next part --------------
From 2c4833d2d725e1eb55d8c2846e82e4e021bd7534 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Mon, 15 Jun 2020 17:01:17 +0200
Subject: [PATCH] sources/opensuse: Fix x86 tarballs

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 sources/opensuse-http.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sources/opensuse-http.go b/sources/opensuse-http.go
index 7267de0..bccdfc1 100644
--- a/sources/opensuse-http.go
+++ b/sources/opensuse-http.go
@@ -179,6 +179,11 @@ func (s *OpenSUSEHTTP) getTarballName(u *url.URL, release, arch string) string {
 		return ""
 	}
 
+	// Translate x86 architectures.
+	if strings.HasSuffix(arch, "86") {
+		arch = "ix86"
+	}
+
 	nodes := htmlquery.Find(doc, `//a/@href`)
 	re := regexp.MustCompile(fmt.Sprintf("^opensuse-%s-image.*%s.*\\.tar.xz$", release, arch))
 


More information about the lxc-devel mailing list