From: "'Arjunan, Srinu' via isar-users" <isar-users@googlegroups.com>
To: Uladzimir Bely <ubely@ilbers.de>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: RE: [PATCH 2/3] image: download deb-src packages after imager creation
Date: Thu, 6 Mar 2025 06:10:28 +0000 [thread overview]
Message-ID: <PUZPR06MB5747ADC9174D4F1FAD6B990888CA2@PUZPR06MB5747.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <d58ee313adf4bf1f289b8d8c5c89a58c6fcc4e0f.camel@ilbers.de>
Thanks Uladzimir for the findings, will try to reproduce and fix the issue.
Thanks,
Srinu
-----Original Message-----
From: Uladzimir Bely <ubely@ilbers.de>
Sent: 06 March 2025 11:35
To: Arjunan, Srinu (FT FDS CES LX PBU 2) <srinuvasan.a@siemens.com>; isar-users@googlegroups.com
Subject: Re: [PATCH 2/3] image: download deb-src packages after imager creation
On Wed, 2025-03-05 at 19:55 +0530, srinuvasan.a@siemens.com wrote:
> From: srinuvasan <srinuvasan.a@siemens.com>
>
> With the present implementation, deb-src packages are missing for
> imager related deb packages (packages listed in IMAGER_INSTALL).
> Copy the /var/log/dpkg.log file from the sbuild environment to outside
> With that, use the list to download deb-src packages for
> IMAGER_INSTALL related deb packages.
>
> Presently, cache_deb_src function running as part of
> ROOTFS_POSTPROCESS_COMMAND, this will not be helpful to get the imager
> related deb-src packages, hence make cache_deb_src as a separate task
> and running always after do_image to get the imager deps related
> deb-src packages.
>
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
> meta/classes/image-tools-extension.bbclass | 8 +++++++-
> meta/classes/image.bbclass | 8 +++++++-
> meta/classes/rootfs.bbclass | 3 ++-
> 3 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/image-tools-extension.bbclass
> b/meta/classes/image-tools-extension.bbclass
> index e8ace8f5..156dfcb3 100644
> --- a/meta/classes/image-tools-extension.bbclass
> +++ b/meta/classes/image-tools-extension.bbclass
> @@ -7,6 +7,9 @@
>
> inherit sbuild
>
> +PP = "/home/builder/${PN}-${MACHINE}"
> +ext_root="${PP}/rootfs"
> +
> IMAGER_INSTALL ??= ""
> IMAGER_BUILD_DEPS ??= ""
> DEPENDS += "${IMAGER_BUILD_DEPS}"
> @@ -59,9 +62,11 @@ EOAPT
>
> deb_dl_dir_export ${schroot_dir} ${distro}
> schroot -r -c ${session_id} -d / -u root -- sh -c " \
> + rm -f /var/log/dpkg.log
> apt-get -o Debug::pkgProblemResolver=yes --no-install-
> recommends -y \
> --allow-unauthenticated --allow-downgrades install \
> - ${local_install}"
> + ${local_install}
> + cp /var/log/dpkg.log ${ext_root}/dpkg_partial.log"
This fails on any build with FSTYPES including (at least) "ext4":
```
[stdlog] 2025-03-05 19:12:45,460 avocado.app ERROR| ERROR: Logfile of failure stored in:
/workspace/build/isar_ub_devel_fast/210/build/tmp/work/debian-bullseye-
armhf/isar-image-base-qemuarm/1.0-r0/temp/log.do_image_ext4.3684960
...
[stdlog] 2025-03-05 19:12:54,914 avocado.test INFO | | cp: cannot stat
'/var/log/dpkg.log': No such file or directory ```
Can be easy reproduced with kas menu, if "ext4" is added to additional image fstypes.
> fi
>
> schroot -r -c ${session_id} "$@"
> @@ -70,4 +75,5 @@ EOAPT
>
> remove_mounts
> schroot_delete_configs
> + sbuild_dpkg_log_export "${WORKDIR}/rootfs/dpkg_partial.log"
> }
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 56eca202..66b4d313 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -72,7 +72,13 @@ ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}"
> ROOTFS_DPKGSTATUS_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}"
> ROOTFS_PACKAGE_SUFFIX ?= "${PN}-${DISTRO}-${MACHINE}"
>
> -ROOTFS_POSTPROCESS_COMMAND:prepend =
> "${@bb.utils.contains('BASE_REPO_FEATURES', 'cache-deb-src',
> 'cache_deb_src', '', d)} "
> +CACHE_DEB_SRC = "${@bb.utils.contains('BASE_REPO_FEATURES', 'cache-
> deb-src', '1', '0', d)}"
> +
> +python () {
> + if bb.utils.to_boolean(d.getVar('CACHE_DEB_SRC')):
> + bb.build.addtask('do_cache_deb_src', 'do_deploy',
> 'do_image', d)
> +}
> +
>
> inherit rootfs
> inherit sdk
> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
> index 205da640..b9d360e7 100644
> --- a/meta/classes/rootfs.bbclass
> +++ b/meta/classes/rootfs.bbclass
> @@ -272,7 +272,8 @@ python do_rootfs_install() {
> }
> addtask rootfs_install before do_rootfs_postprocess after do_unpack
>
> -cache_deb_src() {
> +do_cache_deb_src[network] = "${TASK_USE_SUDO}"
> +do_cache_deb_src() {
> if [ -e "${ROOTFSDIR}"/etc/resolv.conf ] ||
> [ -h "${ROOTFSDIR}"/etc/resolv.conf ]; then
> sudo mv "${ROOTFSDIR}"/etc/resolv.conf
> "${ROOTFSDIR}"/etc/resolv.conf.isar
--
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/PUZPR06MB5747ADC9174D4F1FAD6B990888CA2%40PUZPR06MB5747.apcprd06.prod.outlook.com.
next prev parent reply other threads:[~2025-03-06 6:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 14:25 [PATCH 1/3] mmdebstrap: add "skip=cleanup/reproducible" option to mmdebstrap srinuvasan.a via isar-users
2025-03-05 14:25 ` [PATCH 2/3] image: download deb-src packages after imager creation srinuvasan.a via isar-users
2025-03-06 6:05 ` Uladzimir Bely
2025-03-06 6:10 ` 'Arjunan, Srinu' via isar-users [this message]
2025-03-07 12:25 ` [PATCH v2 1/3] mmdebstrap: add "skip=cleanup/reproducible" option to mmdebstrap srinuvasan.a via isar-users
2025-03-07 12:25 ` [PATCH v2 2/3] image: download deb-src packages after imager creation srinuvasan.a via isar-users
2025-03-07 12:25 ` [PATCH v2 3/3] image: disable clean-log-files ROOTFS_FEATURES for deb-src caching srinuvasan.a via isar-users
2025-03-07 21:59 ` [PATCH v2 1/3] mmdebstrap: add "skip=cleanup/reproducible" option to mmdebstrap 'Jan Kiszka' via isar-users
2025-03-08 13:44 ` 'cedric.hombourger@siemens.com' via isar-users
2025-03-08 18:25 ` 'Arjunan, Srinu' via isar-users
2025-03-08 19:15 ` 'cedric.hombourger@siemens.com' via isar-users
2025-03-09 8:46 ` 'Arjunan, Srinu' via isar-users
2025-03-10 9:14 ` 'cedric.hombourger@siemens.com' via isar-users
2025-03-10 12:01 ` 'Arjunan, Srinu' via isar-users
2025-03-08 19:20 ` 'cedric.hombourger@siemens.com' via isar-users
2025-03-08 18:20 ` Srinuvasan Arjunan
2025-03-05 14:25 ` [PATCH 3/3] image: disable clean-log-files ROOTFS_FEATURES for deb-src caching srinuvasan.a via isar-users
2025-03-05 14:40 ` [PATCH 1/3] mmdebstrap: add "skip=cleanup/reproducible" option to mmdebstrap 'Jan Kiszka' via isar-users
2025-03-06 6:08 ` 'Arjunan, Srinu' via isar-users
2025-03-06 8:20 ` 'Jan Kiszka' via isar-users
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=PUZPR06MB5747ADC9174D4F1FAD6B990888CA2@PUZPR06MB5747.apcprd06.prod.outlook.com \
--to=isar-users@googlegroups.com \
--cc=srinuvasan.a@siemens.com \
--cc=ubely@ilbers.de \
/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