diff mbox series

cooker: Avoid sideeffects for autorev from getAllKeysWithFlags

Message ID 20231122141624.3484780-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit cb9b6530f3d12c56a8b48847af2e7461924205d2
Headers show
Series cooker: Avoid sideeffects for autorev from getAllKeysWithFlags | expand

Commit Message

Richard Purdie Nov. 22, 2023, 2:16 p.m. UTC
If we expand the variable AUTOREV in OE-Core, it triggers side effects in the
fetcher. The situation isn't ideal and needs improvement but this breaks
and is blocking enabling BB_DEFAULT_EVENTLOG.

Hack around the issue for now so we unblock things until we can work out
a better plan for how to improve AUTOREV support.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/cooker.py | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 9f84030962..d658db9bd8 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1557,7 +1557,13 @@  class BBCooker:
 
 
     def getAllKeysWithFlags(self, flaglist):
+        def dummy_autorev(d):
+            return
+
         dump = {}
+        # Horrible but for now we need to avoid any sideeffects of autorev being called
+        saved = bb.fetch2.get_autorev
+        bb.fetch2.get_autorev = dummy_autorev
         for k in self.data.keys():
             try:
                 expand = True
@@ -1577,6 +1583,7 @@  class BBCooker:
                             dump[k][d] = None
             except Exception as e:
                 print(e)
+        bb.fetch2.get_autorev = saved
         return dump