From: "'cedric.hombourger@siemens.com' via isar-users" <isar-users@googlegroups.com>
To: "ubely@ilbers.de" <ubely@ilbers.de>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"Arjunan, Srinu" <srinuvasan.a@siemens.com>
Cc: "Niedermayr, BENEDIKT" <benedikt.niedermayr@siemens.com>,
"Adithya.Balakumar@toshiba-tsip.com"
<Adithya.Balakumar@toshiba-tsip.com>,
"Kiszka, Jan" <jan.kiszka@siemens.com>
Subject: Re: [PATCH 1/1] image: move deb-src-caching functionality after image creation
Date: Fri, 21 Mar 2025 06:32:13 +0000 [thread overview]
Message-ID: <93562f50de78ba1701fed92c387553f9d5bb55bf.camel@siemens.com> (raw)
In-Reply-To: <b2d7131d9972d36b57adde42c0f0aa06f092ad48.camel@ilbers.de>
On Fri, 2025-03-21 at 09:27 +0300, Uladzimir Bely wrote:
> On Thu, 2025-03-20 at 07:18 +0000, 'Arjunan, Srinu' via isar-users
> wrote:
> >
> >
> > -----Original Message-----
> > From: Uladzimir Bely <ubely@ilbers.de>
> > Sent: 20 March 2025 11:02
> > To: Arjunan, Srinu (FT FDS CES LX PBU 2)
> > <srinuvasan.a@siemens.com>;
> > isar-users@googlegroups.com
> > Cc: Kiszka, Jan (FT RPD CED) <jan.kiszka@siemens.com>; Hombourger,
> > Cedric (FT FDS CES LX) <cedric.hombourger@siemens.com>; Niedermayr,
> > Benedikt (FT RPD CED OES-DE) <benedikt.niedermayr@siemens.com>;
> > Adithya.Balakumar@toshiba-tsip.com
> > Subject: Re: [PATCH 1/1] image: move deb-src-caching functionality
> > after image creation
> >
> > On Tue, 2025-03-18 at 16:45 +0000, Arjunan, Srinu wrote:
> > >
> > >
> > > -----Original Message-----
> > > From: Arjunan, Srinu (FT FDS CES LX PBU 2)
> > > <srinuvasan.a@siemens.com>
> > > Sent: 10 March 2025 17:22
> > > To: isar-users@googlegroups.com
> > > Cc: Kiszka, Jan (FT RPD CED) <jan.kiszka@siemens.com>;
> > > Hombourger,
> > > Cedric (FT FDS CES LX) <cedric.hombourger@siemens.com>;
> > > ubely@ilbers.de; Niedermayr, Benedikt (FT RPD CED OES-DE)
> > > <benedikt.niedermayr@siemens.com>;
> > > Adithya.Balakumar@toshiba-tsip.com; Arjunan, Srinu (FT FDS CES LX
> > > PBU
> > > 2) <srinuvasan.a@siemens.com>
> > > Subject: [PATCH 1/1] image: move deb-src-caching functionality
> > > after
> > > image creation
> > >
> > > From: srinuvasan <srinuvasan.a@siemens.com>
> > >
> > > When we do deb-src caching, we are missing to cache imager
> > > related
> > > packages, because the deb-src-caching functionality runs in the
> > > stage
> > > of ROOTFS_POSTPROCESS_COMAMND, but image creation task runs after
> > > the
> > > rootfs creation, hence imager related packages are missing in
> > > rootfs's
> > > var/cache/apt/archives.
> > >
> > > To solve this issue run the deb-src-caching after image creation,
> > > now
> > > we can able to download deb-src for all the deb packages.
> > >
> > > Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> > > ---
> > > meta/classes/image.bbclass | 8 +++++++-
> > > meta/classes/rootfs.bbclass
> > > > 3 ++-
> > > 2 files changed, 9 insertions(+), 2 deletions(-)
> > >
> > > 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 2348e269..c9e832dc 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
> > > --
> > > 2.39.5
> > >
> > > Hi All,
> > >
> > > Can you please update the status of this patch?, or
> > > anything
> > > missing from my end?
> > >
> >
> > Hello.
> >
> > Sorry for delays related to "installer" currently breaking full CI
> > on
> > "next" branch.
> >
> > Tested recently your patch, it also makes CI fail at:
> >
> > CrossTest.test_cross_debsrc:
> >
> > ```
> > [stdlog] 2025-03-19 21:29:50,542 avocado.app ERROR| ERROR: Task
> > (mc:qemuarm64-
> > bookworm:/workspace/build/isar_ub_devel_fast/214/meta-
> > test/recipes-core/images/isar-image-ci.bb:do_cache_deb_src) failed
> > with exit code '1'
> > [stdlog] 2025-03-19 21:30:44,921 avocado.test INFO | | DEBUG:
> > Executing shell function do_cache_deb_src [stdlog] 2025-03-19
> > 21:30:44,921 avocado.test INFO | | Reading package lists...
> > [stdlog] 2025-03-19 21:30:44,921 avocado.test INFO | | E: You must
> > put some 'deb-src' URIs in your sources.list ```
> >
> > NoCrossTest.test_nocross_debsrc:
> >
> > ```
> > [stdlog] 2025-03-20 01:09:35,759 avocado.app ERROR| ERROR: Logfile
> > of
> > failure stored in:
> > /workspace/build/isar_ub_devel/126/build/tmp/work/debian-bookworm-
> > armhf/isar-image-ci-qemuarm/1.0-r0/temp/log.do_cache_deb_src.218291
> > [stdlog] 2025-03-20 01:09:35,832 avocado.app ERROR| ERROR: Task
> > (mc:qemuarm-bookworm:/workspace/build/isar_ub_devel/126/meta-
> > test/recipes-core/images/isar-image-ci.bb:do_cache_deb_src) failed
> > with exit code '1'
> > [stdlog] 2025-03-20 01:19:35,822 avocado.test INFO | | DEBUG:
> > Executing shell function do_cache_deb_src [stdlog] 2025-03-20
> > 01:19:35,823 avocado.test INFO | | Reading package lists...
> > [stdlog] 2025-03-20 01:19:35,823 avocado.test INFO | | E: You must
> > put some 'deb-src' URIs in your sources.list ```
> >
> >
> > Hi Uladzimir,
> >
> > Thank you for the reply, I am not able to
> > reproduce the build issue what you reported , I triggered the build
> > for isar-image-ci target and it's getting passed.
> >
> > This patch depend on Cedric patch [1]
> > [1]:
> > https://groups.google.com/g/isar-users/c/OwrSBmCPe0Y
> >
> > I validated my patch along with the [1], it seems working fine.
> >
> > Or Can you please provide the steps to reproduce the issue?
> >
> >
> > > Many thanks,
> > > Srinu
> > >
> >
>
> I finally found root cause and easy steps to reproduce. The patch
> moves
> debsrc caching to later stage and that results in incompatibility
> with
> DISTRO_APT_PREMIRRORS option we are globally using in CI.
Ah thanks. Are you seeing any issues with my patch alone? (was going to
re-run a local CI build to *double* check)
Would appreciate if my changes may be CI-checked alone and merged;
provided there are no issues ofcourse :)
>
> Steps to reproduce:
>
> 1. Run `./kas/kas-container menu`
> 2. Change the configuration:
> - `Mirror selection => Use specific Debian mirror`:
> http://ftp.de.debian.org/
> - `Cache all source packages`: Check the option
> - `Packages selection => Isar packages`: Uncheck everything to
> speedup
> build (not necessary step)
> 3. Run build
>
> It fails with:
>
> ```
> ERROR: isar-image-base-1.0-r0 do_cache_deb_src:
> ExecutionError('/build/tmp/work/debian-bookworm-amd64/isar-image-
> base-
> qemuamd64/1.0-r0/temp/run.do_cache_deb_src.10979', 100, None, None)
> ERROR: Logfile of failure stored in: /build/tmp/work/debian-bookworm-
> amd64/isar-image-base-qemuamd64/1.0-
> r0/temp/log.do_cache_deb_src.10979
> Log data follows:
> > DEBUG: Executing shell function do_cache_deb_src
> > Reading package lists...
> > E: You must put some 'deb-src' URIs in your sources.list
> ERROR: Task (/build/../repo/meta-isar/recipes-core/images/isar-image-
> base.bb:do_cache_deb_src) failed with exit code '1'
> ```
>
> > --
> > Best regards,
> > Uladzimir.
> >
>
--
Cedric Hombourger
Siemens AG
http://www.siemens.com/
--
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/93562f50de78ba1701fed92c387553f9d5bb55bf.camel%40siemens.com.
next prev parent reply other threads:[~2025-03-21 6:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 11:51 [PATCH 0/1] Fix deb-src caching issue srinuvasan.a via isar-users
2025-03-10 11:51 ` [PATCH 1/1] image: move deb-src-caching functionality after image creation srinuvasan.a via isar-users
2025-03-18 16:45 ` 'Arjunan, Srinu' via isar-users
2025-03-20 5:31 ` Uladzimir Bely
2025-03-20 7:18 ` 'Arjunan, Srinu' via isar-users
2025-03-20 8:27 ` 'cedric.hombourger@siemens.com' via isar-users
2025-03-20 17:56 ` Uladzimir Bely
2025-03-20 18:02 ` 'cedric.hombourger@siemens.com' via isar-users
2025-03-21 5:32 ` Uladzimir Bely
2025-03-21 6:27 ` Uladzimir Bely
2025-03-21 6:32 ` 'cedric.hombourger@siemens.com' via isar-users [this message]
2025-03-21 7:06 ` Uladzimir Bely
2025-03-21 8:39 ` Uladzimir Bely
2025-03-21 13:50 ` 'cedric.hombourger@siemens.com' via isar-users
2025-03-27 16:55 ` Srinuvasan Arjunan
2025-04-03 12:58 ` [PATCH 1/2] meta/classes/rootfs: carry bootstrap list file until the image rootfs srinuvasan.a via isar-users
2025-04-03 12:58 ` [PATCH 2/2] image: move deb-src-caching functionality after image creation srinuvasan.a 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=93562f50de78ba1701fed92c387553f9d5bb55bf.camel@siemens.com \
--to=isar-users@googlegroups.com \
--cc=Adithya.Balakumar@toshiba-tsip.com \
--cc=benedikt.niedermayr@siemens.com \
--cc=cedric.hombourger@siemens.com \
--cc=jan.kiszka@siemens.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