diff options
author | Randy Witt <randy.e.witt@linux.intel.com> | 2016-04-06 23:55:39 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-09 23:00:46 +0100 |
commit | e1e459e480bc6a530cec6ed2718ce52d5ef93149 (patch) | |
tree | 2b1e2209ac5136e59a32f8f84e4df655115c9da0 /bitbake/lib/bb/utils.py | |
parent | 43150ab7ec63d804e8a998ecee9d00295b8b2bc7 (diff) | |
download | poky-e1e459e480bc6a530cec6ed2718ce52d5ef93149.tar.gz |
bitbake: lib/bb/utils.py: Fix a bug in edit_metadata() that could corrupt vars
edit_metadata() would corrupt a variable that was multiline, but
had the ending quotes on the same line as the last value. For example:
TEST_VAR = " foo \
bar"
would become " foo ba" because the code would always delete the last
character on the line and then do it again if the line ended in the
quote. This however doesn't show up if you have:
TEST_VAR = " foo \
bar \
"
which is how all the test cases were written.
This patch fixes that bug and adds and fixes a test that matched the bugs
behavior rather than the expected behavior.
(Bitbake rev: 14f05cbdc2ad8d59a94af1c8816567d93c39c88c)
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index e9ad68f2d7..8d7df13be7 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -1158,7 +1158,7 @@ def edit_metadata(meta_lines, variables, varfunc, match_overrides=False): | |||
1158 | if in_var.endswith('()'): | 1158 | if in_var.endswith('()'): |
1159 | if full_value.count('{') - full_value.count('}') >= 0: | 1159 | if full_value.count('{') - full_value.count('}') >= 0: |
1160 | continue | 1160 | continue |
1161 | full_value = full_value[:-1] | 1161 | full_value = full_value[:-1] |
1162 | if handle_var_end(): | 1162 | if handle_var_end(): |
1163 | updated = True | 1163 | updated = True |
1164 | checkspc = True | 1164 | checkspc = True |