* [PATCH] image: Account for differences with mmdebstrap
@ 2025-02-10 12:49 'Jan Kiszka' via isar-users
2025-02-18 6:48 ` Uladzimir Bely
0 siblings, 1 reply; 2+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-02-10 12:49 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger, Srinuvasan A, Anton Mikanovich
From: Jan Kiszka <jan.kiszka@siemens.com>
Only legacy debootstrap needed moving of sources-list. With mmdebstrap,
we are now creating the list twice, and apt will complain about that on
the target.
Furthermore, the cleaning prior to installing custom lists needs to take
the different filenames with mmdebstrap into account.
Fixes: d0fd18ef87d2 ("meta: Allow selecting bootstrap providers")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Please double-check, I didn't test the custom lists path.
meta/classes/image.bbclass | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 49861b75..56eca202 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -416,12 +416,16 @@ do_rootfs_finalize() {
-maxdepth 1 -name 'qemu-*-static' -type f -delete
fi
- if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ] && [ -d "${ROOTFSDIR}/etc/apt/sources.list.d" ]; then
+ # needed only for debootstrap, mmdebstrap leave a 0000bootstrap.list behind
+ if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ] && \
+ [ -d "${ROOTFSDIR}/etc/apt/sources.list.d" ] && \
+ [ -z "$(find ${ROOTFSDIR}/etc/apt/sources.list.d -mindepth 1)" ]; then
mv "${ROOTFSDIR}/etc/apt/sources-list" \
"${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
fi
+
if [ -n "${IMAGE_LISTS}" ]; then
- rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
+ find "${ROOTFSDIR}/etc/apt/sources.list.d/" ! -type d -exec rm -f {} \;
for l in ${IMAGE_LISTS}; do
cp "${WORKDIR}"/${l} "${ROOTFSDIR}/etc/apt/sources.list.d/"
done
--
2.43.0
--
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/b1e4bdbf-bb22-4eef-844d-10b8ebab32a8%40siemens.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] image: Account for differences with mmdebstrap
2025-02-10 12:49 [PATCH] image: Account for differences with mmdebstrap 'Jan Kiszka' via isar-users
@ 2025-02-18 6:48 ` Uladzimir Bely
0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2025-02-18 6:48 UTC (permalink / raw)
To: Jan Kiszka, isar-users
On Mon, 2025-02-10 at 13:49 +0100, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Only legacy debootstrap needed moving of sources-list. With
> mmdebstrap,
> we are now creating the list twice, and apt will complain about that
> on
> the target.
>
> Furthermore, the cleaning prior to installing custom lists needs to
> take
> the different filenames with mmdebstrap into account.
>
> Fixes: d0fd18ef87d2 ("meta: Allow selecting bootstrap providers")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Please double-check, I didn't test the custom lists path.
>
> meta/classes/image.bbclass | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 49861b75..56eca202 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -416,12 +416,16 @@ do_rootfs_finalize() {
> -maxdepth 1 -name 'qemu-*-static' -type f -delete
> fi
>
> - if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ] && [ -d
> "${ROOTFSDIR}/etc/apt/sources.list.d" ]; then
> + # needed only for debootstrap, mmdebstrap leave a
> 0000bootstrap.list behind
> + if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ] && \
> + [ -d "${ROOTFSDIR}/etc/apt/sources.list.d" ] && \
> + [ -z "$(find ${ROOTFSDIR}/etc/apt/sources.list.d -
> mindepth 1)" ]; then
> mv "${ROOTFSDIR}/etc/apt/sources-list" \
> "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
> fi
> +
> if [ -n "${IMAGE_LISTS}" ]; then
> - rm -f
> "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
> + find "${ROOTFSDIR}/etc/apt/sources.list.d/" ! -type d -
> exec rm -f {} \;
> for l in ${IMAGE_LISTS}; do
> cp "${WORKDIR}"/${l}
> "${ROOTFSDIR}/etc/apt/sources.list.d/"
> done
> --
> 2.43.0
>
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/af3abe28090c1873b0fb8efc1e46e986a78a6586.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-18 6:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-10 12:49 [PATCH] image: Account for differences with mmdebstrap 'Jan Kiszka' via isar-users
2025-02-18 6:48 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox