public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH 0/1] Exit bootstrap with error if apt-get update fails
Date: Wed, 19 Oct 2022 06:31:38 +0200	[thread overview]
Message-ID: <20221019043139.27219-1-ubely@ilbers.de> (raw)

Sometimes we have issues with `deb.debian.org` availability. Usually, it
results in errors in the related tasks that are understandable, e.g.,
`Could not connect to deb.debian.org:80` and so on.

But if the issue happens while debootstrapping at the `apt-get update`
stage, it doesn't produce an error and the following tasks fail instead
with a pretty weird reason (no any errors in the nearest context).

For example, we can get errors in buildchroot-target:

```
E: Package 'make' has no installation candidate
E: Unable to locate package debhelper
...
```
The reason is that `actual` error happened in `bootstrap` task, but it
didn't fail with error code.

Adding `-o APT::Update::Error-Mode=any` (this is an apt configuration
equivalent of `--error-on=any` option) makes apt fail in such cases
during the debootstrapping.

Unfortunatelly, proposed solution doesn't work for `stretch` and
`buster` while they have older apt versions.

Technically, it's possible support these legacy distros, but it will
require ugly workarounds with redirecting apt-get output, parcing
it for `^W` messages (warnings) and generating artificial errors. It
doesn't looks like something that is worth implementing.

Uladzimir Bely (1):
  Exit bootstrap with error if apt-get update fails

 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.20.1


             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 Uladzimir Bely [this message]
2022-10-19  4:31 ` [PATCH 1/1] " Uladzimir Bely
2022-10-26 14:02 ` [PATCH 0/1] " 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-1-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