From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH v2 1/4] rootfs: Split isar-apt and base-apt cleanup
Date: Thu, 21 Dec 2023 12:31:39 +0200 [thread overview]
Message-ID: <20231221103142.47089-2-amikan@ilbers.de> (raw)
In-Reply-To: <20231221103142.47089-1-amikan@ilbers.de>
To allow separate isar-apt and base-apt source lists cleanup control
remove this files in different functions.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes/rootfs.bbclass | 8 ++++++++
meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 3 +++
2 files changed, 11 insertions(+)
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 1b95115a..498fbfd6 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -305,6 +305,14 @@ rootfs_cleanup_isar_apt() {
set -e
rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/isar-apt.list"
rm -f "${ROOTFSDIR}/etc/apt/preferences.d/isar-apt"
+EOSUDO
+}
+
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_cleanup_base_apt"
+rootfs_cleanup_base_apt[weight] = "2"
+rootfs_cleanup_base_apt() {
+ sudo -s <<'EOSUDO'
+ set -e
rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list"
rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar"
EOSUDO
diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
index 938b8334..39ced80b 100644
--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
+++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
@@ -60,6 +60,9 @@ ROOTFS_PACKAGES = "${SBUILD_CHROOT_PREINSTALL}"
ROOTFS_CONFIGURE_COMMAND:remove = "rootfs_configure_isar_apt"
ROOTFS_POSTPROCESS_COMMAND:remove = "rootfs_cleanup_isar_apt"
+# Do not cleanup base-apt
+ROOTFS_POSTPROCESS_COMMAND:remove = "rootfs_cleanup_base_apt"
+
DEPLOY_SCHROOT = "${@d.getVar('SCHROOT_' + d.getVar('SBUILD_VARIANT').upper() + '_DIR')}${SBUILD_SCHROOT_SUFFIX}"
do_sbuildchroot_deploy[dirs] = "${DEPLOY_DIR}/schroot-${SBUILD_VARIANT}"
--
2.34.1
next prev parent reply other threads:[~2023-12-21 10:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 10:31 [PATCH v2 0/4] Fixing isar-apt usage inside SDK Anton Mikanovich
2023-12-21 10:31 ` Anton Mikanovich [this message]
2023-12-21 10:31 ` [PATCH v2 2/4] sdk: Remove duplicated isar-apt cleanup Anton Mikanovich
2023-12-21 10:31 ` [PATCH v2 3/4] sdk: Control isar-apt list removing Anton Mikanovich
2023-12-21 10:31 ` [PATCH v2 4/4] doc/user_manual.md: Improve SDK usage howto Anton Mikanovich
2023-12-29 7:17 ` [PATCH v2 0/4] Fixing isar-apt usage inside SDK Anton Mikanovich
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=20231221103142.47089-2-amikan@ilbers.de \
--to=amikan@ilbers.de \
--cc=isar-users@googlegroups.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