public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Aliaksei Karpovich <akarpovich@ilbers.de>
To: "Moessbauer, Felix" <felix.moessbauer@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH 1/2] rootfs: clean rootfs dir before unpack from sstate
Date: Mon, 26 Oct 2026 14:16:41 +0300	[thread overview]
Message-ID: <dc6bebf9-ca39-4342-85da-e7c3dc8a4502@ilbers.de> (raw)
In-Reply-To: <89be46116224a626aafc4a246f7b41e6bed6bbb8.camel@siemens.com>

[-- Attachment #1: Type: text/plain, Size: 2272 bytes --]


On 10/26/26 12:47, Moessbauer, Felix wrote:
> On Fri, 2026-10-23 at 15:33 +0200, Aliaksei Karpovich wrote:
>> 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}/*
> Hi, this skips hidden files. Can't we use
>
> rootfs_install_sstate_finalize[root_cleandirs] += "${ROOTFSDIR}"
>
> instead? Then we could also avoid the following mkdir.
>
> Felix

Hi,
I thought about it, but in this case logic will be different, the ROOTFS 
dir will be deleted always.
But in current implementation it's deleted only if rootfs.tar exists.

> this skips hidden files It will skip hidden files only in root. Is it real case (hidden files 
in root)? I can change it to 'rm -rf ${ROOTFSDIR}'. Aliaksei

>   
>
>>           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 toisar-users+unsubscribe@googlegroups.com.
>> To view this discussion visithttps://groups.google.com/d/msgid/isar-users/20261023133338.32200-1-akarpovich%40ilbers.de.

-- 
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/dc6bebf9-ca39-4342-85da-e7c3dc8a4502%40ilbers.de.

[-- Attachment #2: Type: text/html, Size: 3641 bytes --]

  reply	other threads:[~2026-10-26 11:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
2026-10-26 11:16   ` Aliaksei Karpovich [this message]
2026-10-26 11:29     ` 'Moessbauer, Felix' 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=dc6bebf9-ca39-4342-85da-e7c3dc8a4502@ilbers.de \
    --to=akarpovich@ilbers.de \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.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