bitbake: cooker: Avoid sideeffects for autorev from getAllKeysWithFlags

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.

(Bitbake rev: cb9b6530f3d12c56a8b48847af2e7461924205d2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2023-11-21 22:30:47 +00:00
parent 6ca541175e
commit 65bd1b3bf7

View File

@@ -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