From: henning.schild@siemens.com
To: isar-users@googlegroups.com
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Srinuvasan A <srinuvasan_a@mentor.com>,
vijai kumar <vijaikumar.kanagarajan@gmail.com>,
Henning Schild <henning.schild@siemens.com>
Subject: [PATCH 1/4] rootfs: configure apt to always retry downloads
Date: Sat, 5 Feb 2022 16:15:25 +0100 [thread overview]
Message-ID: <20220205151528.9199-2-henning.schild@siemens.com> (raw)
In-Reply-To: <20220205151528.9199-1-henning.schild@siemens.com>
Let us stop the bit by bit micro fixes and have a central place for
everything "apt". To deal with download retries in case of network
issues.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
meta/classes/image.bbclass | 1 +
meta/classes/rootfs.bbclass | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 6d77243cb1b1..9d783d80a228 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -221,6 +221,7 @@ do_rootfs_finalize() {
rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/isar-apt.list"
rm -f "${ROOTFSDIR}/etc/apt/preferences.d/isar-apt"
rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list"
+ rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/80isar"
mv "${ROOTFSDIR}/etc/apt/sources-list" \
"${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 1fc487896f4d..e219be4f8529 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -98,6 +98,19 @@ EOF
EOSUDO
}
+ROOTFS_CONFIGURE_COMMAND += "rootfs_configure_apt"
+rootfs_configure_apt[weight] = "2"
+rootfs_configure_apt() {
+ sudo -s <<'EOSUDO'
+ set -e
+
+ mkdir -p '${ROOTFSDIR}/etc/apt/apt.conf.d'
+ echo 'APT::Acquire::Retries "3";' > \
+ '${ROOTFSDIR}/etc/apt/apt.conf.d/80isar'
+EOSUDO
+}
+
+
ROOTFS_INSTALL_COMMAND += "rootfs_install_pkgs_update"
rootfs_install_pkgs_update[weight] = "5"
rootfs_install_pkgs_update[isar-apt-lock] = "acquire-before"
--
2.34.1
next prev parent reply other threads:[~2022-02-05 15:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-05 15:15 [PATCH 0/4] apt configuration fixes henning.schild
2022-02-05 15:15 ` henning.schild [this message]
2022-02-05 15:15 ` [PATCH 2/4] Revert "deb-dl-dir: Retry downloads 3 times for src files" henning.schild
2022-02-05 15:15 ` [PATCH 3/4] Revert "rootfs: Retry downloads 3 times" henning.schild
2022-02-05 15:15 ` [PATCH 4/4] bootstrap: do not leave 50isar.conf in final rootfss henning.schild
2022-02-05 15:18 ` [PATCH 0/4] apt configuration fixes Henning Schild
2022-02-21 9:24 ` Anton Mikanovich
2022-02-21 16:12 ` Henning Schild
2022-02-21 16:51 ` Baurzhan Ismagulov
2022-02-21 18:24 ` Henning Schild
2022-02-21 19:20 ` Jan Kiszka
2022-02-21 20:30 ` Henning Schild
2022-02-22 9:01 ` Bezdeka, Florian
2022-02-22 9:06 ` Jan Kiszka
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=20220205151528.9199-2-henning.schild@siemens.com \
--to=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=srinuvasan_a@mentor.com \
--cc=vijaikumar.kanagarajan@gmail.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