From: Uladzimir Bely <ubely@ilbers.de>
To: srinuvasan.a@siemens.com, isar-users@googlegroups.com
Subject: Re: [PATCH v1] rootfs: clean up the base-apt list conditionally in the image rootfs
Date: Fri, 20 Dec 2024 10:47:53 +0300 [thread overview]
Message-ID: <1591092b68fd8c82c513d57efb910c58c076d6d3.camel@ilbers.de> (raw)
In-Reply-To: <20241216055917.1284431-1-srinuvasan.a@siemens.com>
On Mon, 2024-12-16 at 11:29 +0530, srinuvasan.a via isar-users wrote:
> 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
>
Applied to next, thanks.
--
Best regards,
Uladzimir.
--
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/1591092b68fd8c82c513d57efb910c58c076d6d3.camel%40ilbers.de.
prev parent reply other threads:[~2024-12-20 7:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 5:59 srinuvasan.a via isar-users
2024-12-20 7:47 ` Uladzimir Bely [this message]
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=1591092b68fd8c82c513d57efb910c58c076d6d3.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.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