public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] isar-bootstrap: Drop arch identification
@ 2018-05-01 13:23 Alexander Smirnov
  2018-05-11 17:56 ` Alexander Smirnov
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Smirnov @ 2018-05-01 13:23 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] isar-bootstrap: Drop arch identification
  2018-05-01 13:23 [PATCH] isar-bootstrap: Drop arch identification Alexander Smirnov
@ 2018-05-11 17:56 ` Alexander Smirnov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Smirnov @ 2018-05-11 17:56 UTC (permalink / raw)
  To: isar-users

On 05/01/2018 04:23 PM, Alexander Smirnov wrote:
> 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'.
> 

Applied to next.

Alex

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-11 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 13:23 [PATCH] isar-bootstrap: Drop arch identification Alexander Smirnov
2018-05-11 17:56 ` Alexander Smirnov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox