public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] multistrap: do not ignore multistrap errors anymore
@ 2017-10-19 16:36 Henning Schild
  2017-10-19 16:40 ` Henning Schild
  2017-10-24  7:25 ` Alexander Smirnov
  0 siblings, 2 replies; 3+ messages in thread
From: Henning Schild @ 2017-10-19 16:36 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Issue: Isar problems are often hard to debug and often enough you wonder
why configscript.sh is not there. In that case the real problem always
is in multistrap actually failing and Isar ignoring the return value.

Change: Do not ignore the return value of multistrap anymore.

Impact: Debugging should become much easier, the last error message will
be the actual error message.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta-isar/recipes-core/images/isar-image-base.bb | 2 +-
 meta/recipes-devtools/buildchroot/buildchroot.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index 121b586..7e36e22 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -55,7 +55,7 @@ do_rootfs() {
     sudo mount -t proc none ${IMAGE_ROOTFS}/proc
 
     # Create root filesystem
-    sudo multistrap -a ${DISTRO_ARCH} -d "${IMAGE_ROOTFS}" -f "${WORKDIR}/multistrap.conf" || true
+    sudo multistrap -a ${DISTRO_ARCH} -d "${IMAGE_ROOTFS}" -f "${WORKDIR}/multistrap.conf"
 
     # Configure root filesystem
     sudo chroot ${IMAGE_ROOTFS} /${DISTRO_CONFIG_SCRIPT} ${MACHINE_SERIAL} ${BAUDRATE_TTY} \
diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
index 452536f..3e5c0ac 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.bb
+++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
@@ -55,7 +55,7 @@ do_build() {
     sudo mount -t proc none ${IMAGE_ROOTFS}/proc
 
     # Create root filesystem
-    sudo multistrap -a ${DISTRO_ARCH} -d "${BUILDCHROOT_DIR}" -f "${WORKDIR}/multistrap.conf" || true
+    sudo multistrap -a ${DISTRO_ARCH} -d "${BUILDCHROOT_DIR}" -f "${WORKDIR}/multistrap.conf"
 
     # Install package builder script
     sudo install -m 755 ${THISDIR}/files/build.sh ${BUILDCHROOT_DIR}
-- 
2.13.6


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

* Re: [PATCH] multistrap: do not ignore multistrap errors anymore
  2017-10-19 16:36 [PATCH] multistrap: do not ignore multistrap errors anymore Henning Schild
@ 2017-10-19 16:40 ` Henning Schild
  2017-10-24  7:25 ` Alexander Smirnov
  1 sibling, 0 replies; 3+ messages in thread
From: Henning Schild @ 2017-10-19 16:40 UTC (permalink / raw)
  To: isar-users

On Thu, 19 Oct 2017 18:36:59 +0200
Henning Schild <henning.schild@siemens.com> wrote:

> Issue: Isar problems are often hard to debug and often enough you
> wonder why configscript.sh is not there. In that case the real
> problem always is in multistrap actually failing and Isar ignoring
> the return value.
> 
> Change: Do not ignore the return value of multistrap anymore.
> 
> Impact: Debugging should become much easier, the last error message
> will be the actual error message.

Whoever put that "|| true" there probably had a reason to do so. The
multistrap manpage says something about accumulating also warnings and
adding them up in the return value. That might be the reason for
ignoring the output of such an essential step.
However, i could just build an image with this patch applied.

Henning
 
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta-isar/recipes-core/images/isar-image-base.bb | 2 +-
>  meta/recipes-devtools/buildchroot/buildchroot.bb | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-isar/recipes-core/images/isar-image-base.bb
> b/meta-isar/recipes-core/images/isar-image-base.bb index
> 121b586..7e36e22 100644 ---
> a/meta-isar/recipes-core/images/isar-image-base.bb +++
> b/meta-isar/recipes-core/images/isar-image-base.bb @@ -55,7 +55,7 @@
> do_rootfs() { sudo mount -t proc none ${IMAGE_ROOTFS}/proc
>  
>      # Create root filesystem
> -    sudo multistrap -a ${DISTRO_ARCH} -d "${IMAGE_ROOTFS}" -f
> "${WORKDIR}/multistrap.conf" || true
> +    sudo multistrap -a ${DISTRO_ARCH} -d "${IMAGE_ROOTFS}" -f
> "${WORKDIR}/multistrap.conf" 
>      # Configure root filesystem
>      sudo chroot ${IMAGE_ROOTFS} /${DISTRO_CONFIG_SCRIPT}
> ${MACHINE_SERIAL} ${BAUDRATE_TTY} \ diff --git
> a/meta/recipes-devtools/buildchroot/buildchroot.bb
> b/meta/recipes-devtools/buildchroot/buildchroot.bb index
> 452536f..3e5c0ac 100644 ---
> a/meta/recipes-devtools/buildchroot/buildchroot.bb +++
> b/meta/recipes-devtools/buildchroot/buildchroot.bb @@ -55,7 +55,7 @@
> do_build() { sudo mount -t proc none ${IMAGE_ROOTFS}/proc 
>      # Create root filesystem
> -    sudo multistrap -a ${DISTRO_ARCH} -d "${BUILDCHROOT_DIR}" -f
> "${WORKDIR}/multistrap.conf" || true
> +    sudo multistrap -a ${DISTRO_ARCH} -d "${BUILDCHROOT_DIR}" -f
> "${WORKDIR}/multistrap.conf" 
>      # Install package builder script
>      sudo install -m 755 ${THISDIR}/files/build.sh ${BUILDCHROOT_DIR}


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

* Re: [PATCH] multistrap: do not ignore multistrap errors anymore
  2017-10-19 16:36 [PATCH] multistrap: do not ignore multistrap errors anymore Henning Schild
  2017-10-19 16:40 ` Henning Schild
@ 2017-10-24  7:25 ` Alexander Smirnov
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Smirnov @ 2017-10-24  7:25 UTC (permalink / raw)
  To: Henning Schild, isar-users

On 10/19/2017 07:36 PM, Henning Schild wrote:
> Issue: Isar problems are often hard to debug and often enough you wonder
> why configscript.sh is not there. In that case the real problem always
> is in multistrap actually failing and Isar ignoring the return value.
> 

IIRC, there was GPG warning message which was treated as error after 
multistrap finishes rootfs installation. I've started test build to 
check if all the supported configurations work now.

Alex

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

end of thread, other threads:[~2017-10-24  7:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 16:36 [PATCH] multistrap: do not ignore multistrap errors anymore Henning Schild
2017-10-19 16:40 ` Henning Schild
2017-10-24  7:25 ` Alexander Smirnov

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