@@ -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"
@@ -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
}
deleted file mode 100644
@@ -1,2 +0,0 @@
-APT::Install-Recommends "0";
-APT::Install-Suggests "0";
@@ -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
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