summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-12-11 15:32:55 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-14 23:16:17 +0000
commit5935783f216cfa20826a7ac64b0d78e9693e0e21 (patch)
treef51501523bf9dbe23c02e349130e7fbf01de1d86 /bitbake
parent7fdad7011167656735f94e0830042f77a2665c8c (diff)
downloadpoky-5935783f216cfa20826a7ac64b0d78e9693e0e21.tar.gz
bitbake: lib/bb/utils: fix error in edit_metadata() when deleting first line
If you tried to delete the variable on the first line passed to edit_metadata() this failed because the logic for trimming extra blank lines didn't expect the list to be empty at that point - fix that bad assumption. (Bitbake master rev: 8bce6fefdc5c046b916588962a2b429c0f648133) (Bitbake rev: 3fbf3f8211183ecb18938f2fc9acaa400766d9f0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 7f82687ae4..9b28952231 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -1177,7 +1177,7 @@ def edit_metadata(meta_lines, variables, varfunc, match_overrides=False):
1177 if not skip: 1177 if not skip:
1178 if checkspc: 1178 if checkspc:
1179 checkspc = False 1179 checkspc = False
1180 if newlines[-1] == '\n' and line == '\n': 1180 if newlines and newlines[-1] == '\n' and line == '\n':
1181 # Squash blank line if there are two consecutive blanks after a removal 1181 # Squash blank line if there are two consecutive blanks after a removal
1182 continue 1182 continue
1183 newlines.append(line) 1183 newlines.append(line)