From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 3/4] fix(dpkg-build): scan DEPLOY_DIR_DEB only once in do_deploy_deb
Date: Thu, 10 Sep 2026 16:02:00 +0200 [thread overview]
Message-ID: <20260910140201.250854-4-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20260910140201.250854-1-felix.moessbauer@siemens.com>
do_deploy_deb removed the packages from isar-apt via deb_clean() and then
scanned DEPLOY_DIR_DEB to add them back. DEPLOY_DIR_DEB is shared by all
multiconfigs with the same DISTRO and DISTRO_ARCH, and is transiently
empty while do_dpkg_build of one of them rebuilds the recipe, between
sstate_clean() in its prefunc and sstate_install() in its postfunc. A
do_deploy_deb of another multiconfig hitting that window removed the
package from isar-apt and added nothing back, while still reporting
success. The package was then missing from isar-apt although present in
DEPLOY_DIR_DEB, and do_rootfs_install failed to install it much later:
E: Unable to locate package example-module-armmp
Scan DEPLOY_DIR_DEB once and skip the update entirely when it is empty,
leaving isar-apt untouched instead of clearing it. That is safe: the
multiconfig doing the rebuild runs its own do_deploy_deb once
do_dpkg_build completed.
Fixes: 1182a45b ("fix(dpkg-build): deploy debs via shared sstate dir")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes-recipe/dpkg-base.bbclass | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/meta/classes-recipe/dpkg-base.bbclass b/meta/classes-recipe/dpkg-base.bbclass
index 66f4d177..fbb952bd 100644
--- a/meta/classes-recipe/dpkg-base.bbclass
+++ b/meta/classes-recipe/dpkg-base.bbclass
@@ -255,12 +255,21 @@ do_clean[lockfiles] = "${REPO_ISAR_DIR}/isar.lock"
do_clean[network] = "${TASK_USE_SUDO}"
do_deploy_deb() {
- deb_clean
+ # Removal is by source name and architecture (deb_clean), so a single scan
+ # of DEPLOY_DIR_DEB is only needed for the addition below.
debs=$(find ${DEPLOY_DIR_DEB} -maxdepth 1 -name '*.deb')
- if [ -n "${debs}" ]; then
- repo_add_packages "${REPO_ISAR_DIR}"/"${DISTRO}" \
- "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" ${debs}
+ if [ -z "${debs}" ]; then
+ # DEPLOY_DIR_DEB is shared by all multiconfigs with the same DISTRO and
+ # DISTRO_ARCH. It is transiently empty while do_dpkg_build of another
+ # multiconfig rebuilds this recipe, between sstate_clean() in its
+ # prefunc and sstate_install() in its postfunc. Skipping is safe: that
+ # multiconfig runs its own do_deploy_deb once the rebuild completed.
+ bbnote "${DEPLOY_DIR_DEB} is empty, leaving isar-apt untouched"
+ return
fi
+ deb_clean
+ repo_add_packages "${REPO_ISAR_DIR}"/"${DISTRO}" \
+ "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" ${debs}
}
addtask deploy_deb after do_dpkg_build before do_build
--
2.55.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/20260910140201.250854-4-felix.moessbauer%40siemens.com.
next prev parent reply other threads:[~2026-09-10 14:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 14:01 [PATCH 0/4] Fix various race conditions on multiconfig 'Felix Moessbauer' via isar-users
2026-09-10 14:01 ` [PATCH 1/4] fix(dpkg-build): make sstate updates of DEPLOY_DIR_DEB atomic 'Felix Moessbauer' via isar-users
2026-09-10 14:01 ` [PATCH 2/4] fix(dpkg-build): clean isar-apt by source package and arch 'Felix Moessbauer' via isar-users
2026-09-10 14:02 ` 'Felix Moessbauer' via isar-users [this message]
2026-09-10 14:02 ` [PATCH 4/4] fix(dpkg-source): make sstate updates of DEPLOY_DIR_SRC atomic 'Felix Moessbauer' via isar-users
2026-09-15 8:31 ` [PATCH 0/4] Fix various race conditions on multiconfig Zhihang Wei
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=20260910140201.250854-4-felix.moessbauer@siemens.com \
--to=isar-users@googlegroups.com \
--cc=felix.moessbauer@siemens.com \
--cc=jan.kiszka@siemens.com \
/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