public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 1/2] rootfs: clean rootfs dir before unpack from sstate
@ 2026-10-23 13:33 Aliaksei Karpovich
  2026-10-23 13:33 ` [PATCH 2/2] testsuite: add test for rootfs sstate Aliaksei Karpovich
  2026-10-26  9:47 ` [PATCH 1/2] rootfs: clean rootfs dir before unpack from sstate 'Moessbauer, Felix' via isar-users
  0 siblings, 2 replies; 5+ messages in thread
From: Aliaksei Karpovich @ 2026-10-23 13:33 UTC (permalink / raw)
  To: isar-users; +Cc: Aliaksei Karpovich

In case when rootfs is restored (unpacked) from sstate, we have to clean
rootfs dir because it can contain files from previous build which should
not be included in current rootfs and will not be deleted during unpack.
---
 meta/classes-recipe/rootfs.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
index 4fd627c2..99e701e9 100644
--- a/meta/classes-recipe/rootfs.bbclass
+++ b/meta/classes-recipe/rootfs.bbclass
@@ -776,6 +776,7 @@ rootfs_install_sstate_finalize() {
     # - after restoring from cache, there will be a tar which we unpack and then delete
     if [ -f rootfs.tar ]; then
         run_privileged_heredoc <<'EOF'
+        rm -rf ${ROOTFSDIR}/*
         mkdir -p ${ROOTFSDIR}
         tar -C ${ROOTFSDIR} -xp ${SSTATE_TAR_ATTR_FLAGS} -f rootfs.tar
 EOF
-- 
2.53.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/20261023133338.32200-1-akarpovich%40ilbers.de.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-26 11:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23 13:33 [PATCH 1/2] rootfs: clean rootfs dir before unpack from sstate Aliaksei Karpovich
2026-10-23 13:33 ` [PATCH 2/2] testsuite: add test for rootfs sstate Aliaksei Karpovich
2026-10-26  9:47 ` [PATCH 1/2] rootfs: clean rootfs dir before unpack from sstate 'Moessbauer, Felix' via isar-users
2026-10-26 11:16   ` Aliaksei Karpovich
2026-10-26 11:29     ` 'Moessbauer, Felix' 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