summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2007-04-01 10:05:40 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2007-04-01 10:05:40 +0000
commit567bea2a4a85877ede859567589a0a0176ed9694 (patch)
tree0cc70885bbe0455882c6d67ec87f070f128835a1
parent4ae815df90d539075bf7f82ab1e04461e7e7651e (diff)
downloadbitbake-567bea2a4a85877ede859567589a0a0176ed9694.tar.gz
Allow operations other than assignment on flag variables (from trunk)
-rw-r--r--ChangeLog1
-rw-r--r--lib/bb/parse/parse_py/ConfHandler.py16
2 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 093b42d3f..0cb85db87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ Changes in Bitbake 1.8.2:
- Catch truncated cache file errors
- Add PE (Package Epoch) support from Philipp Zabel (pH5)
- Add code to handle inter-task dependencies
+ - Allow operations other than assignment on flag variables
Changes in Bitbake 1.8.0:
- Release 1.7.x as a stable series
diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py
index 1ae673079..0e05928d8 100644
--- a/lib/bb/parse/parse_py/ConfHandler.py
+++ b/lib/bb/parse/parse_py/ConfHandler.py
@@ -161,6 +161,12 @@ def handle(fn, data, include = 0):
return data
def feeder(lineno, s, fn, data):
+ def getFunc(groupd, key, data):
+ if 'flag' in groupd and groupd['flag'] != None:
+ return bb.data.getVarFlag(key, groupd['flag'], data)
+ else:
+ return bb.data.getVar(key, data)
+
m = __config_regexp__.match(s)
if m:
groupd = m.groupdict()
@@ -168,19 +174,19 @@ def feeder(lineno, s, fn, data):
if "exp" in groupd and groupd["exp"] != None:
bb.data.setVarFlag(key, "export", 1, data)
if "ques" in groupd and groupd["ques"] != None:
- val = bb.data.getVar(key, data)
+ val = getFunc(groupd, key, data)
if val == None:
val = groupd["value"]
elif "colon" in groupd and groupd["colon"] != None:
val = bb.data.expand(groupd["value"], data)
elif "append" in groupd and groupd["append"] != None:
- val = "%s %s" % ((bb.data.getVar(key, data) or ""), groupd["value"])
+ val = "%s %s" % ((getFunc(groupd, key, data) or ""), groupd["value"])
elif "prepend" in groupd and groupd["prepend"] != None:
- val = "%s %s" % (groupd["value"], (bb.data.getVar(key, data) or ""))
+ val = "%s %s" % (groupd["value"], (getFunc(groupd, key, data) or ""))
elif "postdot" in groupd and groupd["postdot"] != None:
- val = "%s%s" % ((bb.data.getVar(key, data) or ""), groupd["value"])
+ val = "%s%s" % ((getFunc(groupd, key, data) or ""), groupd["value"])
elif "predot" in groupd and groupd["predot"] != None:
- val = "%s%s" % (groupd["value"], (bb.data.getVar(key, data) or ""))
+ val = "%s%s" % (groupd["value"], (getFunc(groupd, key, data) or ""))
else:
val = groupd["value"]
if 'flag' in groupd and groupd['flag'] != None: