* [RFC 1/1] speedup localepurge task by emulating less
@ 2025-08-21 14:45 'Felix Moessbauer' via isar-users
2025-08-21 15:24 ` 'Jan Kiszka' via isar-users
0 siblings, 1 reply; 5+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2025-08-21 14:45 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, cedric.hombourger, Felix Moessbauer
The download and dpkg status tasks do not need to be emulated, as these
properly support running without a chroot and for a foreign architecture.
The install task itself does support running without a chroot, however
not for a foreign architecture. By that, we keep the emulation of the
install task for now.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes/image-locales-extension.bbclass | 8 +++++---
meta/classes/rootfs.bbclass | 1 +
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/classes/image-locales-extension.bbclass b/meta/classes/image-locales-extension.bbclass
index 9149d643..787719cd 100644
--- a/meta/classes/image-locales-extension.bbclass
+++ b/meta/classes/image-locales-extension.bbclass
@@ -29,8 +29,10 @@ ROOTFS_INSTALL_COMMAND_BEFORE_EXPORT += "image_install_localepurge_download"
image_install_localepurge_download[weight] = "40"
image_install_localepurge_download[network] = "${TASK_USE_NETWORK_AND_SUDO}"
image_install_localepurge_download() {
- sudo -E chroot '${ROOTFSDIR}' \
- /usr/bin/apt-get ${ROOTFS_APT_ARGS} --download-only localepurge
+ sudo -E apt-get \
+ ${ROOTFS_APT_ARGS} \
+ ${NO_CHROOT_APT_ARGS} \
+ --download-only localepurge
}
ROOTFS_INSTALL_COMMAND += "image_install_localepurge_install"
@@ -63,7 +65,7 @@ __EOF__
sudo -E -s <<'EOSUDO'
set -e
localepurge_state='i'
- if chroot '${ROOTFSDIR}' dpkg -s localepurge 2>/dev/null >&2
+ if dpkg --root '${ROOTFSDIR}' -s localepurge 2>/dev/null >&2
then
echo 'localepurge was installed (leaving it installed later)'
else
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 4de684a4..1098a100 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -20,6 +20,7 @@ ROOTFS_BASE_DISTRO ?= "${BASE_DISTRO}"
ROOTFS_FEATURES ?= ""
ROOTFS_APT_ARGS="install --yes -o Debug::pkgProblemResolver=yes"
+NO_CHROOT_APT_ARGS ?= "-o APT::Architecture=${DISTRO_ARCH} -o Dir=${ROOTFSDIR}"
ROOTFS_CLEAN_FILES="/etc/hostname /etc/resolv.conf"
--
2.50.1
--
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/20250821144519.298099-1-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC 1/1] speedup localepurge task by emulating less
2025-08-21 14:45 [RFC 1/1] speedup localepurge task by emulating less 'Felix Moessbauer' via isar-users
@ 2025-08-21 15:24 ` 'Jan Kiszka' via isar-users
2025-09-15 6:20 ` 'Jan Kiszka' via isar-users
0 siblings, 1 reply; 5+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-08-21 15:24 UTC (permalink / raw)
To: Felix Moessbauer, isar-users; +Cc: cedric.hombourger
On 21.08.25 16:45, Felix Moessbauer wrote:
> The download and dpkg status tasks do not need to be emulated, as these
> properly support running without a chroot and for a foreign architecture.
>
> The install task itself does support running without a chroot, however
> not for a foreign architecture. By that, we keep the emulation of the
> install task for now.
Can we always parse with older dpkg newer installations? Or does this
silently assume that builder-release == target-release then?
To avoid emulation, I would use the dpkg from the host-chroot instead.
Jan
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> meta/classes/image-locales-extension.bbclass | 8 +++++---
> meta/classes/rootfs.bbclass | 1 +
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/image-locales-extension.bbclass b/meta/classes/image-locales-extension.bbclass
> index 9149d643..787719cd 100644
> --- a/meta/classes/image-locales-extension.bbclass
> +++ b/meta/classes/image-locales-extension.bbclass
> @@ -29,8 +29,10 @@ ROOTFS_INSTALL_COMMAND_BEFORE_EXPORT += "image_install_localepurge_download"
> image_install_localepurge_download[weight] = "40"
> image_install_localepurge_download[network] = "${TASK_USE_NETWORK_AND_SUDO}"
> image_install_localepurge_download() {
> - sudo -E chroot '${ROOTFSDIR}' \
> - /usr/bin/apt-get ${ROOTFS_APT_ARGS} --download-only localepurge
> + sudo -E apt-get \
> + ${ROOTFS_APT_ARGS} \
> + ${NO_CHROOT_APT_ARGS} \
> + --download-only localepurge
> }
>
> ROOTFS_INSTALL_COMMAND += "image_install_localepurge_install"
> @@ -63,7 +65,7 @@ __EOF__
> sudo -E -s <<'EOSUDO'
> set -e
> localepurge_state='i'
> - if chroot '${ROOTFSDIR}' dpkg -s localepurge 2>/dev/null >&2
> + if dpkg --root '${ROOTFSDIR}' -s localepurge 2>/dev/null >&2
> then
> echo 'localepurge was installed (leaving it installed later)'
> else
> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
> index 4de684a4..1098a100 100644
> --- a/meta/classes/rootfs.bbclass
> +++ b/meta/classes/rootfs.bbclass
> @@ -20,6 +20,7 @@ ROOTFS_BASE_DISTRO ?= "${BASE_DISTRO}"
> ROOTFS_FEATURES ?= ""
>
> ROOTFS_APT_ARGS="install --yes -o Debug::pkgProblemResolver=yes"
> +NO_CHROOT_APT_ARGS ?= "-o APT::Architecture=${DISTRO_ARCH} -o Dir=${ROOTFSDIR}"
>
> ROOTFS_CLEAN_FILES="/etc/hostname /etc/resolv.conf"
>
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/b8e4485d-9f36-4b3e-9566-b2d7685ee5d7%40siemens.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC 1/1] speedup localepurge task by emulating less
2025-08-21 15:24 ` 'Jan Kiszka' via isar-users
@ 2025-09-15 6:20 ` 'Jan Kiszka' via isar-users
2025-09-15 8:23 ` 'MOESSBAUER, Felix' via isar-users
0 siblings, 1 reply; 5+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-09-15 6:20 UTC (permalink / raw)
To: Felix Moessbauer, isar-users; +Cc: cedric.hombourger
On 21.08.25 17:24, 'Jan Kiszka' via isar-users wrote:
> On 21.08.25 16:45, Felix Moessbauer wrote:
>> The download and dpkg status tasks do not need to be emulated, as these
>> properly support running without a chroot and for a foreign architecture.
>>
>> The install task itself does support running without a chroot, however
>> not for a foreign architecture. By that, we keep the emulation of the
>> install task for now.
>
> Can we always parse with older dpkg newer installations? Or does this
> silently assume that builder-release == target-release then?
>
> To avoid emulation, I would use the dpkg from the host-chroot instead.
>
BTW, with this pattern adjusted, we could also apply it
rootfs_install_pkgs_download and deb-dl-dir.bbclass.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/02cd8640-569d-4eb6-aa8d-57c4f3212628%40siemens.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC 1/1] speedup localepurge task by emulating less
2025-09-15 6:20 ` 'Jan Kiszka' via isar-users
@ 2025-09-15 8:23 ` 'MOESSBAUER, Felix' via isar-users
2025-09-15 8:28 ` 'Jan Kiszka' via isar-users
0 siblings, 1 reply; 5+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2025-09-15 8:23 UTC (permalink / raw)
To: isar-users, Kiszka, Jan; +Cc: cedric.hombourger
On Mon, 2025-09-15 at 08:20 +0200, Jan Kiszka wrote:
> On 21.08.25 17:24, 'Jan Kiszka' via isar-users wrote:
> > On 21.08.25 16:45, Felix Moessbauer wrote:
> > > The download and dpkg status tasks do not need to be emulated, as these
> > > properly support running without a chroot and for a foreign architecture.
> > >
> > > The install task itself does support running without a chroot, however
> > > not for a foreign architecture. By that, we keep the emulation of the
> > > install task for now.
> >
> > Can we always parse with older dpkg newer installations? Or does this
> > silently assume that builder-release == target-release then?
> >
> > To avoid emulation, I would use the dpkg from the host-chroot instead.
> >
>
> BTW, with this pattern adjusted, we could also apply it
> rootfs_install_pkgs_download and deb-dl-dir.bbclass.
This is already taken care of by the series "rootfs: introduce wrapper
to run native commands against a rootfs" by Cedric. I anyways propose
to merge his series first and then move on here.
On 20.08.2025 I already sent a ping, but did not get any response.
Felix
>
> Jan
>
> --
> Siemens AG, Foundational Technologies
> Linux Expert Center
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany
--
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/f17dbd52987c0ea86a905065c044c070aba16e0f.camel%40siemens.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC 1/1] speedup localepurge task by emulating less
2025-09-15 8:23 ` 'MOESSBAUER, Felix' via isar-users
@ 2025-09-15 8:28 ` 'Jan Kiszka' via isar-users
0 siblings, 0 replies; 5+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-09-15 8:28 UTC (permalink / raw)
To: Moessbauer, Felix (FT RPD CED OES-DE), isar-users
Cc: Hombourger, Cedric (FT FDS CES LX)
On 15.09.25 10:23, Moessbauer, Felix (FT RPD CED OES-DE) wrote:
> On Mon, 2025-09-15 at 08:20 +0200, Jan Kiszka wrote:
>> On 21.08.25 17:24, 'Jan Kiszka' via isar-users wrote:
>>> On 21.08.25 16:45, Felix Moessbauer wrote:
>>>> The download and dpkg status tasks do not need to be emulated, as these
>>>> properly support running without a chroot and for a foreign architecture.
>>>>
>>>> The install task itself does support running without a chroot, however
>>>> not for a foreign architecture. By that, we keep the emulation of the
>>>> install task for now.
>>>
>>> Can we always parse with older dpkg newer installations? Or does this
>>> silently assume that builder-release == target-release then?
>>>
>>> To avoid emulation, I would use the dpkg from the host-chroot instead.
>>>
>>
>> BTW, with this pattern adjusted, we could also apply it
>> rootfs_install_pkgs_download and deb-dl-dir.bbclass.
>
> This is already taken care of by the series "rootfs: introduce wrapper
> to run native commands against a rootfs" by Cedric. I anyways propose
> to merge his series first and then move on here.
>
...for which the very same concern applies.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/7dcf3029-4be2-46fd-a303-48a88ea34298%40siemens.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-15 8:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-21 14:45 [RFC 1/1] speedup localepurge task by emulating less 'Felix Moessbauer' via isar-users
2025-08-21 15:24 ` 'Jan Kiszka' via isar-users
2025-09-15 6:20 ` 'Jan Kiszka' via isar-users
2025-09-15 8:23 ` 'MOESSBAUER, Felix' via isar-users
2025-09-15 8:28 ` 'Jan Kiszka' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox