From: "srinuvasan.a via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: cedric.hombourger@siemens.com, amikan@ilbers.de,
srinuvasan <srinuvasan.a@siemens.com>
Subject: [PATCH v1] rootfs: clean up the base-apt list conditionally in the image rootfs
Date: Mon, 16 Dec 2024 11:29:17 +0530 [thread overview]
Message-ID: <20241216055917.1284431-1-srinuvasan.a@siemens.com> (raw)
From: srinuvasan <srinuvasan.a@siemens.com>
base-apt list is created under /etc/apt/sources.list.d only when we
enable the ISAR_USE_CACHED_BASE_REPO as "1", otherwise, we use the
bootstrap.list
Presently the removal of base-apt.list is happening unconditionally,
hence remove the base-apt list only when we use the local cached repo.
isar-mmdebstrap generates the base-apt list with prefixes 0000 (0000base-apt.list)
and isar-bootstrap generates the base-apt list with no prefixes (base-apt.list)
handle the scenario to remove if any one of the list present under /etc/apt/sources.list.d
Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
---
meta/classes/rootfs.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index dd43fd4e..205da640 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -359,16 +359,16 @@ 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"
+ rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar"
EOSUDO
}
-ROOTFS_POSTPROCESS_COMMAND += "rootfs_cleanup_base_apt"
+ROOTFS_POSTPROCESS_COMMAND += "${@'rootfs_cleanup_base_apt' if bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')) else ''}"
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"
+ rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/*base-apt.list"
EOSUDO
}
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20241216055917.1284431-1-srinuvasan.a%40siemens.com.
next reply other threads:[~2024-12-16 5:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 5:59 srinuvasan.a via isar-users [this message]
2024-12-20 7:47 ` Uladzimir Bely
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=20241216055917.1284431-1-srinuvasan.a@siemens.com \
--to=isar-users@googlegroups.com \
--cc=amikan@ilbers.de \
--cc=cedric.hombourger@siemens.com \
--cc=srinuvasan.a@siemens.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