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 4/4] bootstrap: do not leave 50isar.conf in final rootfss
Date: Sat, 5 Feb 2022 16:15:28 +0100 [thread overview]
Message-ID: <20220205151528.9199-5-henning.schild@siemens.com> (raw)
In-Reply-To: <20220205151528.9199-1-henning.schild@siemens.com>
This commits makes sure we do not leave a file around which is really
only meant for building. In case people will want to "apt-get" later
they might have their own ideas on how to deal with Recommends and
Suggests. And if so they should write a package to configure apt for
their images.
So it cleans up a file not owned by any package, and unifies the way apt
configuration for the build is done.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
meta/classes/image.bbclass | 2 +-
meta/classes/rootfs.bbclass | 7 +++++--
meta/recipes-core/isar-bootstrap/files/isar-apt.conf | 2 --
meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 5 +----
4 files changed, 7 insertions(+), 9 deletions(-)
delete mode 100644 meta/recipes-core/isar-bootstrap/files/isar-apt.conf
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 9d783d80a228..d44298bcdd7c 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -221,7 +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"
+ rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar"
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 766a2170f43b..e8649975a333 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -105,8 +105,11 @@ rootfs_configure_apt() {
set -e
mkdir -p '${ROOTFSDIR}/etc/apt/apt.conf.d'
- echo 'APT::Acquire::Retries "3";' > \
- '${ROOTFSDIR}/etc/apt/apt.conf.d/80isar'
+ {
+ echo 'APT::Acquire::Retries "3";'
+ echo 'APT::Install-Recommends "0";'
+ echo 'APT::Install-Suggests "0";'
+ } > '${ROOTFSDIR}/etc/apt/apt.conf.d/50isar'
EOSUDO
}
diff --git a/meta/recipes-core/isar-bootstrap/files/isar-apt.conf b/meta/recipes-core/isar-bootstrap/files/isar-apt.conf
deleted file mode 100644
index a62feb1722d6..000000000000
--- a/meta/recipes-core/isar-bootstrap/files/isar-apt.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-APT::Install-Recommends "0";
-APT::Install-Suggests "0";
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 26205192ed9e..2f483f5a1b6a 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -9,7 +9,6 @@ LICENSE = "gpl-2.0"
LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
FILESPATH_prepend := "${THISDIR}/files:"
SRC_URI = " \
- file://isar-apt.conf \
file://isar-apt-fallback.conf \
file://locale \
file://chroot-setup.sh"
@@ -327,9 +326,6 @@ do_bootstrap() {
install -v -m644 "${APTSRCS_INIT}" "${ROOTFSDIR}/etc/apt/sources-list"
rm -f "${ROOTFSDIR}/etc/apt/sources.list"
rm -rf "${ROOTFSDIR}/var/lib/apt/lists/"*
- mkdir -p "${ROOTFSDIR}/etc/apt/apt.conf.d"
- install -v -m644 "${WORKDIR}/isar-apt.conf" \
- "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar.conf"
find ${APT_KEYS_DIR}/ -type f | while read keyfile
do
MY_GPGHOME="$(chroot "${ROOTFSDIR}" mktemp -d /tmp/gpghomeXXXXXXXXXX)"
@@ -348,6 +344,7 @@ do_bootstrap() {
done
if [ "${@get_distro_suite(d)}" = "stretch" ] && [ "${@get_host_release().split('.')[0]}" -lt "4" ]; then
+ mkdir -p "${ROOTFSDIR}/etc/apt/apt.conf.d"
install -v -m644 "${WORKDIR}/isar-apt-fallback.conf" \
"${ROOTFSDIR}/etc/apt/apt.conf.d/55isar-fallback.conf"
fi
--
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 ` [PATCH 1/4] rootfs: configure apt to always retry downloads henning.schild
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 ` henning.schild [this message]
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-5-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