From: "srinuvasan.a via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: cedric.hombourger@siemens.com, ubely@ilbers.de,
srinuvasan <srinuvasan.a@siemens.com>
Subject: [PATCH 2/2] image: move deb-src-caching functionality after image creation
Date: Thu, 3 Apr 2025 18:28:57 +0530 [thread overview]
Message-ID: <20250403125857.2525698-2-srinuvasan.a@siemens.com> (raw)
In-Reply-To: <20250403125857.2525698-1-srinuvasan.a@siemens.com>
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 | 7 ++++++-
meta/classes/rootfs.bbclass | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index ff3cd737..0789e0b6 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -72,7 +72,12 @@ 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)
+}
+
ROOTFS_POSTPROCESS_COMMAND:prepend = "${@bb.utils.contains('BASE_REPO_FEATURES', 'cache-dbg-pkgs', 'cache_dbg_pkgs', '', d)} "
inherit rootfs
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 406e9192..3055b0fc 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
--
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/20250403125857.2525698-2-srinuvasan.a%40siemens.com.
prev parent reply other threads:[~2025-04-03 12:58 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
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 ` srinuvasan.a via isar-users [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=20250403125857.2525698-2-srinuvasan.a@siemens.com \
--to=isar-users@googlegroups.com \
--cc=cedric.hombourger@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