[1/1] fix(isar-sstate): correctly account number of bytes cleaned

Message ID 20261119094234.3630112-1-felix.moessbauer@siemens.com
State Under Review
Headers show
Series [1/1] fix(isar-sstate): correctly account number of bytes cleaned | expand

Commit Message

Felix Moessbauer Nov. 19, 2026, 9:42 a.m. UTC
isar-sstate clean currently reports twice the amount of data that is
actually cleaned: it builds the siginfo set correctly, then mistakenly
applies filters to all_files instead of that set. As a result, old
archives are counted in both deletion lists and their sizes are added
twice.

Fixes: 33ca03c7 ("isar-sstate: add architecture filtering support")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 scripts/isar-sstate | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/scripts/isar-sstate b/scripts/isar-sstate
index 36a91134..9064def5 100755
--- a/scripts/isar-sstate
+++ b/scripts/isar-sstate
@@ -766,7 +766,7 @@  def sstate_clean(target, max_age, max_sig_age, verbose, filter, arch, **kwargs):
     archive_files = [f for f in all_files if f.suffix in ['tgz', 'tar.zst']]
     siginfo_files = [f for f in all_files if f.suffix in ['tgz.siginfo', 'tar.zst.siginfo']]
     archive_files = apply_filters(archive_files, filter, arch)
-    siginfo_files = apply_filters(all_files, filter, arch)
+    siginfo_files = apply_filters(siginfo_files, filter, arch)
 
     del_archive_files = [f for f in archive_files if f.age >= max_age_seconds]
     del_archive_hashes = [f.hash for f in del_archive_files]