diff mbox series

[dunfell,05/14] uninative: Ensure uninative is enabled in all cases for BuildStarted event

Message ID 24897c70980f934cf59a28a0d3b6e8fddcb15a7f.1687446532.git.steve@sakoman.com
State New, archived
Headers show
Series [dunfell,01/14] cups: Fix CVE-2023-32324 | expand

Commit Message

Steve Sakoman June 22, 2023, 3:31 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

Recent changes in bitbake mean the datastore is not always reset between
ConfigParsed and BuildStarted. This means in a fresh buiild, with memory
resident bitbake active, uninative may end up disabled.

Update the code so the enable code is always run at BuildStarted if
needed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit db743cc78fe5172bb4a4dac9c1dad4f5aa9e1491)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/classes/uninative.bbclass | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 4412d7c567..2940935dd7 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -34,6 +34,8 @@  python uninative_event_fetchloader() {
         with open(loaderchksum, "r") as f:
             readchksum = f.read().strip()
         if readchksum == chksum:
+            if "uninative" not in d.getVar("SSTATEPOSTUNPACKFUNCS"):
+                enable_uninative(d)
             return
 
     import subprocess