public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/1] Exit bootstrap with error if apt-get update fails
@ 2022-10-19  4:31 Uladzimir Bely
  2022-10-19  4:31 ` [PATCH 1/1] " Uladzimir Bely
  2022-10-26 14:02 ` [PATCH 0/1] " Anton Mikanovich
  0 siblings, 2 replies; 3+ messages in thread
From: Uladzimir Bely @ 2022-10-19  4:31 UTC (permalink / raw)
  To: isar-users

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


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

end of thread, other threads:[~2022-10-26 14:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19  4:31 [PATCH 0/1] Exit bootstrap with error if apt-get update fails Uladzimir Bely
2022-10-19  4:31 ` [PATCH 1/1] " Uladzimir Bely
2022-10-26 14:02 ` [PATCH 0/1] " Anton Mikanovich

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