public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 1/1] clean: allow to run cleanall after deleting build/tmp
@ 2026-11-18 15:55 'Felix Moessbauer' via isar-users
  0 siblings, 0 replies; only message in thread
From: 'Felix Moessbauer' via isar-users @ 2026-11-18 15:55 UTC (permalink / raw)
  To: isar-users; +Cc: Felix Moessbauer

When deleting the build/tmp (e.g. via a kas clean), a following
bitbake -c cleanall <recipe> fails because the isar apt no longer
exists. By that, the cleanall breaks and does not clean the downloaded
artifact. We now handle this case and just don't remove the .deb from
isar-apt (as isar-apt anyways is gone) and continue deleting the
archive.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes-recipe/dpkg-base.bbclass   | 2 ++
 meta/classes-recipe/dpkg-source.bbclass | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/meta/classes-recipe/dpkg-base.bbclass b/meta/classes-recipe/dpkg-base.bbclass
index 4ec0ddbe..73238a66 100644
--- a/meta/classes-recipe/dpkg-base.bbclass
+++ b/meta/classes-recipe/dpkg-base.bbclass
@@ -237,6 +237,8 @@ CLEANFUNCS =+ "deb_clean"
 # dropped (instead of its variants)
 deb_clean() {
     [ -d "${DEPLOY_DIR_DEB}" ] || return 0
+    # isar-apt may not exist (yet), e.g. after removing the tmp directory
+    [ -f "${REPO_ISAR_DIR}/${DISTRO}/conf/distributions" ] || return 0
     for deb in $(find ${DEPLOY_DIR_DEB} -maxdepth 1 -name '*.deb'); do
         repo_del_package "${REPO_ISAR_DIR}"/"${DISTRO}" \
             "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" "${deb}"
diff --git a/meta/classes-recipe/dpkg-source.bbclass b/meta/classes-recipe/dpkg-source.bbclass
index 6f9091a8..7b4569dd 100644
--- a/meta/classes-recipe/dpkg-source.bbclass
+++ b/meta/classes-recipe/dpkg-source.bbclass
@@ -54,6 +54,8 @@ CLEANFUNCS += "deb_clean_source"
 # runs sstate_cleanall() taking that lock itself, and flock() would deadlock on
 # the nested acquisition.
 deb_clean_source() {
+    # isar-apt may not exist (yet), e.g. after removing the tmp directory
+    [ -f "${REPO_ISAR_DIR}/${DISTRO}/conf/distributions" ] || return 0
     repo_del_srcpackage "${REPO_ISAR_DIR}"/"${DISTRO}" \
         "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" "${DEBIAN_SOURCE}"
 }
-- 
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/20261118155530.2968207-1-felix.moessbauer%40siemens.com.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-18 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 15:55 [PATCH 1/1] clean: allow to run cleanall after deleting build/tmp 'Felix Moessbauer' 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