Skip to contentSkip to conversation

cache/siggen: Fix cache issues with signature handling

PATCH New Richard Purdie 1 participant 1 message Dec 29, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cache/siggen: Fix cache issues with signature handling

There is a bug in the current cache code where the restored data structures were "inverted" leading to some very weird issues, not sure how anything worked like that, this patch fixes it.

Also fix some issues with multiconfig cache ordering problems by resetting the stream counters when appropriate.

---
 lib/bb/cache.py  | 3 ++-
 lib/bb/cooker.py | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
lib/bb/cache.py +2 -1
index f5b527ba6a..3fc097241a 100644
@@ -311,7 +311,7 @@ class SiggenRecipeInfo(RecipeInfoCommon):
             cls.restore_map[pid] = {}
             cls.restore_count[pid] = 1
         map = cls.restore_map[pid]
-        for fs, dep, mapnum in deps:
+        for dep, fs, mapnum in deps:
             if mapnum:
                 ret[dep] = map[mapnum]
             else:
@@ -759,6 +759,7 @@ class MulticonfigCache(Mapping):
         loaded = 0
 
         for c in self.__caches.values():
+            SiggenRecipeInfo.reset()
             loaded += c.prepare_cache(progress)
             previous_progress = current_progress
 
lib/bb/cooker.py +1 -0
index 88c97c5e4a..14440f1647 100644
@@ -2240,6 +2240,7 @@ class CookerParser(object):
 
         def sync_caches():
             for c in self.bb_caches.values():
+                bb.cache.SiggenRecipeInfo.reset()
                 c.sync()
 
         self.syncthread = threading.Thread(target=sync_caches, name="SyncThread")
Signature · 1 line
2.37.2