Skip to contentSkip to conversation

data_smart: Ensure variable flags are accounted for in config data hash

PATCH In review Richard Purdie 2 participants 2 messages Jun 20, 2013 – Jul 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 data_smart: Ensure variable flags are accounted for in config data hash

Currently if the flags set against a variable in the base data store change, it doesn't automatically trigger a reparse when it really should. For example with the blacklist class setting:

PNBLACKLIST[qemu] = "bar"
PNBLACKLIST[bash] = "foo"

will not trigger a reparse if only one entry is changed and a blacklisted recipe can still be built.

I did consider using BB_SIGNATURE_EXCLUDE_FLAGS in here however it doesn't make sense, we want to trigger a reparse when any of the flags change too (which is different to the sstate signatures which we wouldn't want to change in those cases).

[YOCTO #4627]

---

bitbake/lib/bb/data_smart.py +6 -0
index 2fd8ccd..fa7811e 100644
@@ -738,6 +738,12 @@ class DataSmart(MutableMapping):
             value = d.getVar(key, False) or ""
             data.update({key:value})
 
+            varflags = d.getVarFlags(key)
+            if not varflags:
+                continue
+            for f in varflags:
+                data.update({'%s[%s]' % (key, f):varflags[f]})
+
         for key in ["__BBTASKS", "__BBANONFUNCS", "__BBHANDLERS"]:
             bb_list = d.getVar(key, False) or []
             bb_list.sort()
#1 lore raw

Can we get this backported into bitbake-1.18 please?

Quoted 43 lines · Richard Purdie

Currently if the flags set against a variable in the base data store change, it doesn't automatically trigger a reparse when it really should. For example with the blacklist class setting:

PNBLACKLIST[qemu] = "bar"
PNBLACKLIST[bash] = "foo"

will not trigger a reparse if only one entry is changed and a blacklisted recipe can still be built.

I did consider using BB_SIGNATURE_EXCLUDE_FLAGS in here however it doesn't make sense, we want to trigger a reparse when any of the flags change too (which is different to the sstate signatures which we wouldn't want to change in those cases).

[YOCTO #4627]

---

bitbake/lib/bb/data_smart.py +6 -0
index 2fd8ccd..fa7811e 100644
@@ -738,6 +738,12 @@ class DataSmart(MutableMapping):
             value = d.getVar(key, False) or ""
             data.update({key:value})
 
+            varflags = d.getVarFlags(key)
+            if not varflags:
+                continue
+            for f in varflags:
+                data.update({'%s[%s]' % (key, f):varflags[f]})
+
         for key in ["__BBTASKS", "__BBANONFUNCS", "__BBHANDLERS"]:
             bb_list = d.getVar(key, False) or []
             bb_list.sort()

_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel