aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/utils.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-06 10:57:33 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-06 10:35:04 +0100
commit99675c19375c96140bc8ae8f9fc3a1945a77cebb (patch)
treeec257ef31ec61c48b5591d5d6b82fca41ef934a4 /lib/bb/utils.py
parent14c045c6a20993d389b91ae2459d811a1430a7b2 (diff)
downloadbitbake-99675c19375c96140bc8ae8f9fc3a1945a77cebb.tar.gz
lib/bb/utils: edit_metadata() comment tweaks
No functional changes, just make a couple of minor tweaks to the comments for edit_metadata(): * There are four elements to be returned by the callback function * Add an example return statement for when you don't want to modify the value Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/utils.py')
-rw-r--r--lib/bb/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index a855d5851..729848a1c 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -1081,7 +1081,7 @@ def edit_metadata(meta_lines, variables, varfunc, match_overrides=False):
newlines: list of lines up to this point. You can use
this to prepend lines before this variable setting
if you wish.
- and should return a three-element tuple:
+ and should return a four-element tuple:
newvalue: new value to substitute in, or None to drop
the variable setting entirely. (If the removal
results in two consecutive blank lines, one of the
@@ -1095,6 +1095,8 @@ def edit_metadata(meta_lines, variables, varfunc, match_overrides=False):
multi-line value to continue on the same line as
the assignment, False to indent before the first
element.
+ To clarify, if you wish not to change the value, then you
+ would return like this: return origvalue, None, 0, True
match_overrides: True to match items with _overrides on the end,
False otherwise
Returns a tuple: