[lxc-devel] [lxc-ci/master] images/gentoo: Fix portage make.conf

monstermunchkin on Github lxc-bot at linuxcontainers.org
Mon May 25 07:42:38 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 303 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200525/17e36c48/attachment.bin>
-------------- next part --------------
From 7ceb814ab200c2bff395a6475cd5aa710991b233 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Mon, 25 May 2020 09:42:16 +0200
Subject: [PATCH] images/gentoo: Fix portage make.conf

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 images/gentoo.yaml | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/images/gentoo.yaml b/images/gentoo.yaml
index a35c77d..a099e84 100644
--- a/images/gentoo.yaml
+++ b/images/gentoo.yaml
@@ -446,9 +446,21 @@ actions:
     sed -i "s#hkps://keys.gentoo.org#keyserver.ubuntu.com#g" /usr/share/portage/config/repos.conf
     sed -ri "s#(sync-uri =) .+#\1 ${RSYNC_MIRROR}#" /usr/share/portage/config/repos.conf
 
-    TARGET="amd64"
-    [ "$(uname -m)" = "aarch64" ] && TARGET="arm64"
-    echo ACCEPT_KEYWORDS="~${TARGET}" >> /etc/portage/make.conf
+    machine="$(uname -m)"
+    TARGET=
+
+    case "${machine}" in
+    aarch64)
+      TARGET=arm64 ;;
+    i686)
+      TARGET=x86 ;;
+    ppc*)
+      TARGET=ppc ;;
+    x86_64)
+      TARGET=amd64 ;;
+    esac
+
+    [ -n "${TARGET}" ] && echo ACCEPT_KEYWORDS="~${TARGET}" >> /etc/portage/make.conf
   types:
   - container
   - vm


More information about the lxc-devel mailing list