From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7156076541959471104 X-Received: by 2002:a81:793:0:b0:35d:78c5:e06f with SMTP id 141-20020a810793000000b0035d78c5e06fmr5143269ywh.385.1666153907211; Tue, 18 Oct 2022 21:31:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:690c:82e:b0:354:c077:19ef with SMTP id by14-20020a05690c082e00b00354c07719efls6457713ywb.9.-pod-prod-gmail; Tue, 18 Oct 2022 21:31:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4srtMHjr+1S0YcQoBPxAxmkpYxKSm7BTQlVH1L0qGTA1U/2MEL0A8yBvXM0uaso9/WdK9D X-Received: by 2002:a81:1393:0:b0:35d:17d8:c7b6 with SMTP id 141-20020a811393000000b0035d17d8c7b6mr5296792ywt.203.1666153906447; Tue, 18 Oct 2022 21:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666153906; cv=none; d=google.com; s=arc-20160816; b=DTXqtN+rn64lfLjahkx8C0rtfOsBt9DciuncR0VLh6h0m+eSim7fpoLDFK1K32vzsg h9uzb4wsT5UPcJR6W6x9lrqNKmYbR4YdPXRNa2KVac9fzVqZkO3zUMCwNdoGT2oVfS0m tYmOlaYo5HNulFuyYte36YOiwGwkKpjI1ok95zG8uCNkXvzuNMMPgAZ+u21qUW3uug3W /r4vH1wkfhfZOFyrxwlwxDVtTw10xRsBN2Vw0sPqwiFkphe8mL6L9HjHhlKlE4zNF+XT HjN20edmwmFStt7hi4Oox8RFxO/HZDFaFB15yTZIw7u4vGVJY6HS4q37HddDo10/nfei TGJQ== 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:to :from; bh=olLfx8Z8O+B+E6zfz0pEphgIJrVQ+F5fDBChKdsbA7M=; b=Et+xIgu2Z5ApUHJXF/bCQDWAgdlPUwH4fNb+JBDd/P7zmq28AmOyJfzF9Dm2ATa7sM tkKJpMIZA0igMSr51xaeG4v7XfgZWVnTfaMcfNUCvTxaQHm8EKn6r0RQUuHs4q7FOx/f xiLgIzrNO042N/rFzoxeMZ8/tSof9C75OtExGBmERxMxAmrPoaTOqs7zD6KzGehy8LFj 0kXFXjpSuxBWiQ/LMafNgpA6uS5omPWN2T4tJTVZoFx/vit2J+atkM0KaU+qtnedp11V qsdatAxiiMM5r+g5i9gkcs72X3Js8Cr64l8OJ4BQzHJ66V5Uu4m/FSuxYME+vZ5+XAzP qKTQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id a124-20020a816682000000b0035e0f02f094si1412962ywc.2.2022.10.18.21.31.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Oct 2022 21:31:46 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 29J4VdM1023137 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 19 Oct 2022 06:31:40 +0200 From: Uladzimir Bely 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 Message-Id: <20221019043139.27219-1-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: +i7CGK/3DfS2 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