From: roberto.foglietta@linuxteam.org
To: isar-users@googlegroups.com
Cc: roberto.foglietta@gmail.com
Subject: [PATCH v2] do_bootstrap if {HOST,ROOTFS,DISTRO}_ARCH is not set warns v2
Date: Mon, 30 Jan 2023 15:31:09 +0100 [thread overview]
Message-ID: <20230130143109.2356633-1-roberto.foglietta@linuxteam.org> (raw)
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
isar-debootstrap, do_bootstrap(): configuration warning added
These variables determine which debootstrap command to use because
in the general case the qemu-debootstrap should be used but it is
a slower choice when the host/target architectures match. This is
obviously managed by ISAR but the machine configuration file set
by the user could miss to properly set one of these 3 values.
So it is necessary to warn about unless the ISAR layer will properly
fix the user shortage. Also, the day the ISAR layer will correctly
address any lack, a double-check reminder/warning would be useful
because fixed things could be broken again in the future.
v.2: the bootstrap type is set coherently with the host and target
architectures + the warning is provided whatever debootstrap
is choosen because it is related to missing values on arches.
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
v.2: the bootstrap type is set coherently with the host and target
architectures + the warning is provided whatever debootstrap
is choosen because it is related to missing values on arches.
meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index faba73fe..b805e417 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -15,7 +15,7 @@ PV = "1.0"
BOOTSTRAP_FOR_HOST ?= "0"
-DEBOOTSTRAP ?= "qemu-debootstrap"
+DEBOOTSTRAP ?= "${@'qemu-debootstrap' if d.getVar('BOOTSTRAP_FOR_HOST') == '1' else 'debootstrap'}"
ROOTFSDIR = "${WORKDIR}/rootfs"
APTPREFS = "${WORKDIR}/apt-preferences"
APTSRCS = "${WORKDIR}/apt-sources"
@@ -291,6 +291,10 @@ do_bootstrap() {
sudo rm -rf --one-file-system "${ROOTFSDIR}"
deb_dl_dir_import "${ROOTFSDIR}" "${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}"
+ test -z "${HOST_ARCH}" -o -z "${ROOTFS_ARCH}" -o -z "${DISTRO_ARCH}" && \
+ bbwarn "*** ATTENTION *** BOOTSTRAP_FOR_HOST=0, DEBOOTSTRAP=${DEBOOTSTRAP},"\
+ "HOST_ARCH=${HOST_ARCH}, ROOTFS_ARCH=${ROOTFS_ARCH}, DISTRO_ARCH=${DISTRO_ARCH}."
+
sudo -E -s <<'EOSUDO'
set -e
if [ "${BOOTSTRAP_FOR_HOST}" = "0" ]; then
--
2.34.1
reply other threads:[~2023-01-30 14:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230130143109.2356633-1-roberto.foglietta@linuxteam.org \
--to=roberto.foglietta@linuxteam.org \
--cc=isar-users@googlegroups.com \
--cc=roberto.foglietta@gmail.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