From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7194427233723744256 X-Received: by 2002:a5d:4388:0:b0:2bf:d68c:a324 with SMTP id i8-20020a5d4388000000b002bfd68ca324mr416010wrq.425.1675083123932; Mon, 30 Jan 2023 04:52:03 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:ee4b:0:b0:298:bd4a:4dd9 with SMTP id w11-20020adfee4b000000b00298bd4a4dd9ls1446122wro.1.-pod-prod-gmail; Mon, 30 Jan 2023 04:52:02 -0800 (PST) X-Google-Smtp-Source: AK7set8FvaApcr1Lkp8K52C4naBQFkX9x+eMXouT1nll7+KGl88oTimrCGmTX9ZYOOXlhrSKIvTV X-Received: by 2002:adf:a11e:0:b0:2bf:e9dc:5536 with SMTP id o30-20020adfa11e000000b002bfe9dc5536mr4268589wro.45.1675083122569; Mon, 30 Jan 2023 04:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675083122; cv=none; d=google.com; s=arc-20160816; b=ewIVqzak76Cto/QEKEj72HpS4HhFD/MYqi4CGVOfXUq10lMyvJGLybAKl1xxnfzLdQ PLdQ/Ho4ZwclCmfgBSsLQoPzk1aOH9mTIF7dnMFtdf9nnz09NMbEp6QI2JD5fZxlJXzM vlbAFfHAGNHP7sBMjNcyrDQJwU+1B8+vvDv8pHnE8zeC4qjhL4N5g4ApzhRkNxqUC3qH LzXYKp9ooi/5aRBD7U3wXXnSl3kxuGv7ybNXZfL7mevsG8s4WHqqV183wxtilpXKX3pt 0NxcftPvnRumRmL5TdVZFyGetTZVsZY8nSo37gxA+F9ccEi3aPgpHmDa9dhHpha2srsg 3qMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=KTmtA2nnpT4ZDRIVJ+OPmVVLI2rJ28UXNudput9q0DE=; b=WHOalVuJgi0QwonR8x05GIo1kU9c6NyyvL5bZ+aRATE6ct1b7Mx83Qw7XIAzNDnySq 0X17L0MjXd7fqFL5y9+F55R2CVgph7i67KbBPy/Hht4hlaOnd15iqVA2hgqNRxzFgmP/ 9RTABNCdkpGCtAsbMKiKB4aE4ZPrqJd0OLj/kxSRpf/YIAI1KnEFZ3Go2jjmss/NxP4v PLRDMQttAOEU7GZBWG9uarTBKPbSlqkIjUDiUhz+a9LJZE8oL/ITSpT0Sb3Xj8Cw9YxB OJbTNSoyh+ZEIVJFDdMPapsn6o4ZX3Lpb0enc48Tb4sOE98SCbHTo1wOIYiNwgUSzy79 F9Yw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of roberto.foglietta@linuxteam.org designates 2001:4b7a:2000:18::167 as permitted sender) smtp.mailfrom=roberto.foglietta@linuxteam.org Return-Path: Received: from relay06.th.seeweb.it (relay06.th.seeweb.it. [2001:4b7a:2000:18::167]) by gmr-mx.google.com with ESMTPS id m18-20020adfdc52000000b002bfc35954dasi614701wrj.7.2023.01.30.04.52.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 04:52:02 -0800 (PST) Received-SPF: pass (google.com: domain of roberto.foglietta@linuxteam.org designates 2001:4b7a:2000:18::167 as permitted sender) client-ip=2001:4b7a:2000:18::167; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of roberto.foglietta@linuxteam.org designates 2001:4b7a:2000:18::167 as permitted sender) smtp.mailfrom=roberto.foglietta@linuxteam.org Received: from localhost.localdomain (unknown [IPv6:2a02:8071:3187:7b80:8e08:83d9:3ec2:cbf4]) by m-r2.th.seeweb.it (Postfix) with ESMTPA id CAAD93F20C; Mon, 30 Jan 2023 13:52:01 +0100 (CET) From: roberto.foglietta@linuxteam.org To: isar-users@googlegroups.com Cc: roberto.foglietta@gmail.com Subject: [PATCH] do_bootstrap if {HOST,ROOTFS,DISTRO}_ARCH is not set warns Date: Mon, 30 Jan 2023 13:51:58 +0100 Message-Id: <20230130125158.2150684-1-roberto.foglietta@linuxteam.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: HFqMBvwPyhKZ From: "Roberto A. Foglietta" 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. Signed-off-by: Roberto A. Foglietta --- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index faba73fe..5afe49b6 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -291,11 +291,15 @@ do_bootstrap() { sudo rm -rf --one-file-system "${ROOTFSDIR}" deb_dl_dir_import "${ROOTFSDIR}" "${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}" + if [ "${BOOTSTRAP_FOR_HOST}" = "0" ]; then + 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}." + export arch_param="--arch=${DISTRO_ARCH}" + fi + sudo -E -s <<'EOSUDO' set -e - if [ "${BOOTSTRAP_FOR_HOST}" = "0" ]; then - arch_param="--arch=${DISTRO_ARCH}" - fi ${DEBOOTSTRAP} $debootstrap_args \ $arch_param \ ${@get_distro_components_argument(d)} \ -- 2.34.1