public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Cc: Alexander Smirnov <asmirnov@ilbers.de>
Subject: [PATCH] isar-bootstrap: Drop arch identification
Date: Tue,  1 May 2018 16:23:45 +0300	[thread overview]
Message-ID: <20180501132345.25661-1-asmirnov@ilbers.de> (raw)

There is no need to manualy check host and target architectures to
choose between native or qemu debootstraps. This is already implemented
in 'qemu-debootstrap' script. If it detects compatible architectures - it
disables QEMU usage.

Moreover, current function incorrectly identifies 32-bit hosts via 'uname'.
AFAIK there is no 'x86' architecture, it should be 'i686'.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
index a38dd88..ac8c177 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
@@ -14,7 +14,7 @@ SRC_URI = "file://isar-apt.conf"
 PV = "1.0"
 
 WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
-DEBOOTSTRAP ?= ""
+DEBOOTSTRAP ?= "qemu-debootstrap"
 ROOTFSDIR = "${WORKDIR}/rootfs"
 APTPREFS = "${WORKDIR}/apt-preferences"
 APTSRCS = "${WORKDIR}/apt-sources"
@@ -24,21 +24,6 @@ DEBOOTSTRAP_KEYRING = ""
 
 python () {
     from urllib.parse import urlparse
-
-    debootstrap = d.getVar("DEBOOTSTRAP", True)
-    if not debootstrap:
-        target = d.getVar("DISTRO_ARCH", True)
-        machine = os.uname()[4]
-        m = {
-            "x86_64": ["i386", "amd64"],
-            "x86": ["i386"],
-            }
-        if machine not in m or target not in m[machine]:
-            debootstrap = "qemu-debootstrap"
-        else:
-            debootstrap = "debootstrap"
-        d.setVar("DEBOOTSTRAP", debootstrap)
-
     distro_apt_keys = d.getVar("DISTRO_APT_KEYS", False)
     if distro_apt_keys:
         d.setVar("DEBOOTSTRAP_KEYRING", "--keyring ${APTKEYRING}")
-- 
2.1.4


             reply	other threads:[~2018-05-01 13:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01 13:23 Alexander Smirnov [this message]
2018-05-11 17:56 ` Alexander Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180501132345.25661-1-asmirnov@ilbers.de \
    --to=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox