From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7156076541959471104 X-Received: by 2002:a17:903:22c7:b0:185:b0c:e150 with SMTP id y7-20020a17090322c700b001850b0ce150mr6727344plg.138.1666153907014; Tue, 18 Oct 2022 21:31:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:70c4:b0:182:2f14:f701 with SMTP id l4-20020a17090270c400b001822f14f701ls10737742plt.0.-pod-prod-gmail; Tue, 18 Oct 2022 21:31:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5hIvrNPxTTVy3BOSiwaIfyTjkDqrchbdfZvdc9VqUlicTqIcTRB4hs6uR1ezMwq3Fj1tpe X-Received: by 2002:a17:90a:fd01:b0:20b:61f:cd49 with SMTP id cv1-20020a17090afd0100b0020b061fcd49mr7559734pjb.239.1666153906121; 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=QgQnGTcJD5yczWSYix3glaG2U3B+v5hueU/VIVrHLI7Wt4wuMazcdd3AF+kLcgF34R u3ZVygG4Ks2DStV4KY5kfvL9rtuZtnROaHGEC+DIhydarRUo4Ab/Iv3EVOpuVc3NJfzn KLqt/54m31X1ZE13Zf6Dw0xaZkVOB+QAnjyZFApVfuMTClxvQzcyins//tfNwqnq+GBf jNoCiBW9YLvO+Yfdj5IUI68Ng/21bs+C39bEhLoO640t9g1G8WEVhMh+iMFB1GPK1GbD 6gzPiy8iou6yWPOM7UDAwP1j8S0W/0lGjwdUqy0ZZCmSkFpnxatNZRxjNfnzNojd49ED TuUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=1IQqG2DsSmJ4KdhUopxtFPcpRFQ4mdriQTw8ZE6vRL0=; b=irn4d0nqIHgGi1YXGyrSHw0PyEBGNcHCScNBaqSI71YLLgL2TJpVcP6DP6Nr/O/7G0 Wzh6XOqlY91XtV2qI47nT8ihGtce3UbNIQBVQyd8eyFrgRpW8UdZJ1pcs3i0oTDhUToJ cB/lQydCv1ETFjZHk3yRzPNAiGpxlwnMJzY7HeP+rJtlbp1bvxhy9FH3bNkKvf4eKfd5 tJfzaIKLpsiL1pWpOqnlXzyQU+yCVju1fGTSlezJ3FECYkCWVePpCWwWUSE+4f5DOpbt BkcIefdHtp8vdv+G06SZnfZVVUQVh6YIHwKkxMFBBNuHG5SgOyFRKxnxLswxDyROjkCU azDg== 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 77-20020a621450000000b00562bba09b90si544175pfu.0.2022.10.18.21.31.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Oct 2022 21:31:45 -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 29J4VdM2023137 (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 1/1] Exit bootstrap with error if apt-get update fails Date: Wed, 19 Oct 2022 06:31:39 +0200 Message-Id: <20221019043139.27219-2-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221019043139.27219-1-ubely@ilbers.de> References: <20221019043139.27219-1-ubely@ilbers.de> 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: xpGQsfqf3YX1 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 --- 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