From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH 1/1] Exit bootstrap with error if apt-get update fails
Date: Wed, 19 Oct 2022 06:31:39 +0200 [thread overview]
Message-ID: <20221019043139.27219-2-ubely@ilbers.de> (raw)
In-Reply-To: <20221019043139.27219-1-ubely@ilbers.de>
If `apt-get update` can't reach one ore more mirrors listed in
sources.list, it consider this as 'transient' error and doesn't
produce non-zero error code.
So, `do_bootstrap` finishes with no errors in this case and we don't
have proper apt database here and face with errors in the later tasks,
e.g. `rootfs_install_pkg_download` in buildchroot.
The patch adds an option to `apt-get update` that makes it exit with
non-zero code for trancient failures.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index fdaad61b..f32d192e 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -386,7 +386,8 @@ do_bootstrap() {
chroot "${ROOTFSDIR}" /usr/bin/dpkg --add-architecture ${COMPAT_DISTRO_ARCH}
fi
- chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y
+ chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y \
+ -o APT::Update::Error-Mode=any
chroot "${ROOTFSDIR}" /usr/bin/apt-get install -y -f
chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade -y \
-o Debug::pkgProblemResolver=yes
--
2.20.1
next prev parent reply other threads:[~2022-10-19 4:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 4:31 [PATCH 0/1] " Uladzimir Bely
2022-10-19 4:31 ` Uladzimir Bely [this message]
2022-10-26 14:02 ` Anton Mikanovich
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=20221019043139.27219-2-ubely@ilbers.de \
--to=ubely@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