Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH 0/1] Allow exclusion of variable value portions from signatures
@ 2014-03-03 16:54 Paul Eggleton
  2014-03-03 16:54 ` [PATCH 1/1] data: add vardepvalueexclude varflag Paul Eggleton
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggleton @ 2014-03-03 16:54 UTC (permalink / raw)
  To: bitbake-devel

The following change since commit 8239264753977bd06ad5b1b574245d3842af489b:

  fetch2: Drop svk fetcher (2014-03-02 17:23:30 +0000)

is available in the git repository at:

  git://git.yoctoproject.org/poky-contrib paule/vardepvalueexclude
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/vardepvalueexclude

Paul Eggleton (1):
  data: add vardepvalueexclude varflag

 lib/bb/data.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
1.8.5.3



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] data: add vardepvalueexclude varflag
  2014-03-03 16:54 [PATCH 0/1] Allow exclusion of variable value portions from signatures Paul Eggleton
@ 2014-03-03 16:54 ` Paul Eggleton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2014-03-03 16:54 UTC (permalink / raw)
  To: bitbake-devel

On rare occasions it's useful to be able to exclude a part of a
variable's value from the variable's signature; for example if you want
to add an item to a list sometimes and not have the signature of the
variable change depending on whether the item is in the list or not. The
initial intended use case for this in OpenEmbedded is to allow adding a
function to SSTATEPOSTINSTFUNCS in buildhistory.bbclass and not have
that change any task signatures (so adding and removing
INHERIT += "buildhistory" won't lead to any rebuilds).

Part of the fix for [YOCTO #5897].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 lib/bb/data.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/bb/data.py b/lib/bb/data.py
index a56b79c..db938be 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -295,7 +295,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
             deps |= parser.references
             deps = deps | (keys & parser.execs)
             return deps, value
-        varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "postfuncs", "prefuncs"]) or {}
+        varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "vardepvalueexclude", "postfuncs", "prefuncs"]) or {}
         vardeps = varflags.get("vardeps")
         value = d.getVar(key, False)
 
@@ -345,6 +345,12 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
             deps = deps | (keys & parser.execs)
             value = handle_contains(value, parser.contains, d)
 
+        if "vardepvalueexclude" in varflags:
+            exclude = varflags.get("vardepvalueexclude")
+            for excl in exclude.split('|'):
+                if excl:
+                    value = value.replace(excl, '')
+
         # Add varflags, assuming an exclusion list is set
         if varflagsexcl:
             varfdeps = []
-- 
1.8.5.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-03 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-03 16:54 [PATCH 0/1] Allow exclusion of variable value portions from signatures Paul Eggleton
2014-03-03 16:54 ` [PATCH 1/1] data: add vardepvalueexclude varflag Paul Eggleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox