summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-20 11:49:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:00 +0100
commit8587bce564f715e46e7317218b5c190813d3a939 (patch)
treed67f45ca7d88f1ea1dcfc436a82763fa6c39a686 /meta/classes
parenta7309d5790f5dac46e84d3c14959943eb2496fda (diff)
downloadopenembedded-core-contrib-8587bce564f715e46e7317218b5c190813d3a939.tar.gz
openembedded-core-contrib-8587bce564f715e46e7317218b5c190813d3a939.tar.bz2
openembedded-core-contrib-8587bce564f715e46e7317218b5c190813d3a939.zip
classes/lib: Update to match python3 iter requirements
python3 standardises its use of iteration operations. Update the code to match the for python3 requires. (From OE-Core rev: 2476bdcbef591e951d11d57d53f1315848758571) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/buildhistory.bbclass2
-rw-r--r--meta/classes/license.bbclass4
-rw-r--r--meta/classes/populate_sdk_ext.bbclass4
3 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index e3b5c44a09..cc233b5130 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -838,7 +838,7 @@ python write_srcrev() {
f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev))
f.write('SRCREV_%s = "%s"\n' % (name, srcrev))
else:
- f.write('SRCREV = "%s"\n' % srcrevs.itervalues().next())
+ f.write('SRCREV = "%s"\n' % srcrevs.values())
if len(tag_srcrevs) > 0:
for name, srcrev in tag_srcrevs.items():
f.write('# tag_%s = "%s"\n' % (name, srcrev))
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 69335d650d..538ab1976e 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -200,7 +200,7 @@ def get_deployed_dependencies(d):
# it might contain the bootloader.
taskdata = d.getVar("BB_TASKDEPDATA", False)
depends = list(set([dep[0] for dep
- in taskdata.itervalues()
+ in list(taskdata.values())
if not dep[0].endswith("-native")]))
extra_depends = d.getVar("EXTRA_IMAGEDEPENDS", True)
boot_depends = get_boot_dependencies(d)
@@ -261,7 +261,7 @@ def get_boot_dependencies(d):
depends.append(dep)
# We need to search for the provider of the dependency
else:
- for taskdep in taskdepdata.itervalues():
+ for taskdep in taskdepdata.values():
# The fifth field contains what the task provides
if dep in taskdep[4]:
info_file = os.path.join(
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 4c3a038609..a9c6fe5933 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -45,7 +45,7 @@ def get_sdk_install_targets(d):
sdk_install_targets = d.getVar('SDK_TARGETS', True)
depd = d.getVar('BB_TASKDEPDATA', False)
- for v in depd.itervalues():
+ for v in depd.values():
if v[1] == 'do_image_complete':
if v[0] not in sdk_install_targets:
sdk_install_targets += ' {}'.format(v[0])
@@ -267,7 +267,7 @@ python copy_buildsystem () {
# Ensure any variables set from the external environment (by way of
# BB_ENV_EXTRAWHITE) are set in the SDK's configuration
extralines = []
- for name, value in env_whitelist_values.iteritems():
+ for name, value in env_whitelist_values.items():
actualvalue = d.getVar(name, True) or ''
if value != actualvalue:
extralines.append('%s = "%s"\n' % (name, actualvalue))