Skip to contentSkip to conversation

command: Add command to invalidate parse cache

PATCH In review Paul Eggleton 2 participants 5 messages Sep 12, 2017 – Sep 14, 2017

lore
Share & tools
lore
#0 lore raw

cover command: Add command to invalidate parse cache

This is required by the OE-Core patch I'm about to send to fix devtool's lack of handling dependencies during source extraction.

The following changes since commit ed3aab90dbf9b6efefd9eb66d81123cb94d3c7da:

toaster: update pyro to rocko as stable release (2017-09-11 11:00:11 +0100)

are available in the git repository at:

git://git.openembedded.org/bitbake-contrib paule/parsecache-invalidate
http://cgit.openembedded.org/bitbake-contrib/log/?h=paule/parsecache-invalidate

Paul Eggleton (1):
command: Add command to invalidate parse cache

 lib/bb/command.py | 3 +++
 1 file changed, 3 insertions(+)
Signature · 1 line
2.9.5
#1 lore raw

PATCH 1/1 command: Add command to invalidate parse cache

If we make a change to the metadata within a tinfoil-using script and then attempt to run tasks using build_targets(), the change won't get noticed. Add an explicit command that will set the internal flag to force reloading the cache and thus pick up the changes. This will be used in OE by the devtool source extraction rework.

Part of the fix for [YOCTO #11198].

---
 lib/bb/command.py | 3 +++
 1 file changed, 3 insertions(+)
lib/bb/command.py +3 -0
index 6c966e3..c3717ab 100644
@@ -574,6 +574,9 @@ class CommandsSync:
         return DataStoreConnectionHandle(idx)
     parseRecipeFile.readonly = True
 
+    def invalidateParseCache(self, command, params):
+        command.cooker.parsecache_valid = False
+
 class CommandsAsync:
     """
     A class of asynchronous commands
Signature · 1 line
2.9.5
#2 lore raw
Quoted 7 lines · Paul Eggleton

If we make a change to the metadata within a tinfoil-using script and then attempt to run tasks using build_targets(), the change won't get noticed. Add an explicit command that will set the internal flag to
force reloading the cache and thus pick up the changes. This will be used in OE by the devtool source extraction rework.

Quoted 6 lines

Part of the fix for [YOCTO #11198].

---
 lib/bb/command.py | 3 +++

 1 file changed, 3 insertions(+)

Just a quick sanity check. Why won't the change get noticed? Any file writes should be seen by the inotify code which would invalidate the cache? This could mean we're not watching some dependency we should be? or is it that the commands aren't triggering a reparse due to ordering somehow? I'd like to understand this more before we add this...

Cheers,

Richard

#3 lore raw
Quoted 15 lines · NZST Richard Purdie
Quoted 7 lines · Paul Eggleton

If we make a change to the metadata within a tinfoil-using script and then attempt to run tasks using build_targets(), the change won't get noticed. Add an explicit command that will set the internal flag to
force reloading the cache and thus pick up the changes. This will be used in OE by the devtool source extraction rework.

Quoted 6 lines

Part of the fix for [YOCTO #11198].

---
 lib/bb/command.py | 3 +++
 1 file changed, 3 insertions(+)
Quoted 5 lines

Just a quick sanity check. Why won't the change get noticed? Any file writes should be seen by the inotify code which would invalidate the cache? This could mean we're not watching some dependency we should be? or is it that the commands aren't triggering a reparse due to ordering somehow? I'd like to understand this more before we add this...

That's a good question, and you may well be right. I can look into it more closely.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#4 lore raw
Quoted 16 lines · NZST Paul Eggleton
Quoted 15 lines · NZST Richard Purdie
Quoted 13 lines · Paul Eggleton

If we make a change to the metadata within a tinfoil-using script and then attempt to run tasks using build_targets(), the change won't get noticed. Add an explicit command that will set the internal flag to
force reloading the cache and thus pick up the changes. This will be used in OE by the devtool source extraction rework.

Part of the fix for [YOCTO #11198].

---
 lib/bb/command.py | 3 +++
 1 file changed, 3 insertions(+)
Quoted 8 lines
Quoted 5 lines

Just a quick sanity check. Why won't the change get noticed? Any file writes should be seen by the inotify code which would invalidate the cache? This could mean we're not watching some dependency we should be? or is it that the commands aren't triggering a reparse due to ordering somehow? I'd like to understand this more before we add this...

That's a good question, and you may well be right. I can look into it more closely.

You were right - disregard this patch, I'm about to send a new series with a proper fix.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre