diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-20 11:53:11 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:24:00 +0100 |
commit | 44e9a0d2fa759dea281fc32b602cd7878000c277 (patch) | |
tree | 69f6944e4bf34e2309ae8b3cc11eac13afcdf675 /meta/lib/oe/recipeutils.py | |
parent | 8587bce564f715e46e7317218b5c190813d3a939 (diff) | |
download | poky-44e9a0d2fa759dea281fc32b602cd7878000c277.tar.gz |
classes/lib: Update to explictly create lists where needed
Iterators now return views, not lists in python3. Where we need
lists, handle this explicitly.
(From OE-Core rev: caebd862bac7eed725e0f0321bf50793671b5312)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index b437720fe7..146fe83e18 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -692,7 +692,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
692 | 692 | ||
693 | varnames = [item[0] for item in bbappendlines] | 693 | varnames = [item[0] for item in bbappendlines] |
694 | if removevalues: | 694 | if removevalues: |
695 | varnames.extend(removevalues.keys()) | 695 | varnames.extend(list(removevalues.keys())) |
696 | 696 | ||
697 | with open(appendpath, 'r') as f: | 697 | with open(appendpath, 'r') as f: |
698 | (updated, newlines) = bb.utils.edit_metadata(f, varnames, appendfile_varfunc) | 698 | (updated, newlines) = bb.utils.edit_metadata(f, varnames, appendfile_varfunc) |
@@ -743,12 +743,12 @@ def replace_dir_vars(path, d): | |||
743 | """Replace common directory paths with appropriate variable references (e.g. /etc becomes ${sysconfdir})""" | 743 | """Replace common directory paths with appropriate variable references (e.g. /etc becomes ${sysconfdir})""" |
744 | dirvars = {} | 744 | dirvars = {} |
745 | # Sort by length so we get the variables we're interested in first | 745 | # Sort by length so we get the variables we're interested in first |
746 | for var in sorted(d.keys(), key=len): | 746 | for var in sorted(list(d.keys()), key=len): |
747 | if var.endswith('dir') and var.lower() == var: | 747 | if var.endswith('dir') and var.lower() == var: |
748 | value = d.getVar(var, True) | 748 | value = d.getVar(var, True) |
749 | if value.startswith('/') and not '\n' in value and value not in dirvars: | 749 | if value.startswith('/') and not '\n' in value and value not in dirvars: |
750 | dirvars[value] = var | 750 | dirvars[value] = var |
751 | for dirpath in sorted(dirvars.keys(), reverse=True): | 751 | for dirpath in sorted(list(dirvars.keys()), reverse=True): |
752 | path = path.replace(dirpath, '${%s}' % dirvars[dirpath]) | 752 | path = path.replace(dirpath, '${%s}' % dirvars[dirpath]) |
753 | return path | 753 | return path |
754 | 754 | ||