[dunfell,1.46,1/2] cooker: Ensure reparsing is handled correctly

Message ID 92cc71474b4e1b37b81028520c5d1664a4251fc6.1638555853.git.steve@sakoman.com
State Accepted, archived
Commit a6ad6eaf4cddbe45077d1e6cb667f71602b8a49d
Headers show
Series [dunfell,1.46,1/2] cooker: Ensure reparsing is handled correctly | expand

Commit Message

Steve Sakoman Dec. 3, 2021, 6:27 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

From tinfoil, if you edit bblayers.conf and break it, then call
parseConfiguration (e.g. by adding a bad layer with bitbake-layers),
the system doens't show any parse error yet it should.

Add in a call to the updateCache function so that things really
are reparsed when requested.

Partially fixes [YOCTO #14054]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e655f9361b9c3b77906b8e06b5cc76bc5180640e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 lib/bb/cooker.py | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 000faf82..8d9ca680 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -411,6 +411,8 @@  class BBCooker:
             self.data.disableTracking()
 
     def parseConfiguration(self):
+        self.updateCacheSync()
+
         # Change nice level if we're asked to
         nice = self.data.getVar("BB_NICE_LEVEL")
         if nice: