summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-20 10:49:34 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 07:24:00 (GMT)
commit8587bce564f715e46e7317218b5c190813d3a939 (patch)
treed67f45ca7d88f1ea1dcfc436a82763fa6c39a686 /meta/lib/oe
parenta7309d5790f5dac46e84d3c14959943eb2496fda (diff)
downloadpoky-8587bce564f715e46e7317218b5c190813d3a939.tar.gz
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/lib/oe')
-rw-r--r--meta/lib/oe/buildhistory_analysis.py4
-rw-r--r--meta/lib/oe/copy_buildsystem.py2
-rw-r--r--meta/lib/oe/data.py2
-rw-r--r--meta/lib/oe/recipeutils.py8
-rw-r--r--meta/lib/oe/sstatesig.py2
5 files changed, 9 insertions, 9 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 5395c76..0dcd49f 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -62,7 +62,7 @@ class ChangeRecord:
62 62
63 def pkglist_combine(depver): 63 def pkglist_combine(depver):
64 pkglist = [] 64 pkglist = []
65 for k,v in depver.iteritems(): 65 for k,v in depver.items():
66 if v: 66 if v:
67 pkglist.append("%s (%s)" % (k,v)) 67 pkglist.append("%s (%s)" % (k,v))
68 else: 68 else:
@@ -220,7 +220,7 @@ def compare_file_lists(alines, blines):
220 adict = file_list_to_dict(alines) 220 adict = file_list_to_dict(alines)
221 bdict = file_list_to_dict(blines) 221 bdict = file_list_to_dict(blines)
222 filechanges = [] 222 filechanges = []
223 for path, splitv in adict.iteritems(): 223 for path, splitv in adict.items():
224 newsplitv = bdict.pop(path, None) 224 newsplitv = bdict.pop(path, None)
225 if newsplitv: 225 if newsplitv:
226 # Check type 226 # Check type
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index 7b9a0ee..0589b7f 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -124,7 +124,7 @@ class BuildSystem(object):
124def generate_locked_sigs(sigfile, d): 124def generate_locked_sigs(sigfile, d):
125 bb.utils.mkdirhier(os.path.dirname(sigfile)) 125 bb.utils.mkdirhier(os.path.dirname(sigfile))
126 depd = d.getVar('BB_TASKDEPDATA', False) 126 depd = d.getVar('BB_TASKDEPDATA', False)
127 tasks = ['%s.%s' % (v[2], v[1]) for v in depd.itervalues()] 127 tasks = ['%s.%s' % (v[2], v[1]) for v in depd.values()]
128 bb.parse.siggen.dump_lockedsigs(sigfile, tasks) 128 bb.parse.siggen.dump_lockedsigs(sigfile, tasks)
129 129
130def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output): 130def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output):
diff --git a/meta/lib/oe/data.py b/meta/lib/oe/data.py
index 23a9067..ee48950 100644
--- a/meta/lib/oe/data.py
+++ b/meta/lib/oe/data.py
@@ -7,7 +7,7 @@ def typed_value(key, d):
7 flags = d.getVarFlags(key) 7 flags = d.getVarFlags(key)
8 if flags is not None: 8 if flags is not None:
9 flags = dict((flag, d.expand(value)) 9 flags = dict((flag, d.expand(value))
10 for flag, value in flags.iteritems()) 10 for flag, value in list(flags.items()))
11 else: 11 else:
12 flags = {} 12 flags = {}
13 13
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 3e17873..b437720 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -336,7 +336,7 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath=''):
336 varfiles = get_var_files(fn, varlist, d) 336 varfiles = get_var_files(fn, varlist, d)
337 locs = localise_file_vars(fn, varfiles, varlist) 337 locs = localise_file_vars(fn, varfiles, varlist)
338 patches = [] 338 patches = []
339 for f,v in locs.iteritems(): 339 for f,v in locs.items():
340 vals = {k: varvalues[k] for k in v} 340 vals = {k: varvalues[k] for k in v}
341 patchdata = patch_recipe_file(f, vals, patch, relpath) 341 patchdata = patch_recipe_file(f, vals, patch, relpath)
342 if patch: 342 if patch:
@@ -554,7 +554,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
554 bbappendlines = [] 554 bbappendlines = []
555 if extralines: 555 if extralines:
556 if isinstance(extralines, dict): 556 if isinstance(extralines, dict):
557 for name, value in extralines.iteritems(): 557 for name, value in extralines.items():
558 bbappendlines.append((name, '=', value)) 558 bbappendlines.append((name, '=', value))
559 else: 559 else:
560 # Do our best to split it 560 # Do our best to split it
@@ -594,7 +594,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
594 copyfiles = {} 594 copyfiles = {}
595 if srcfiles: 595 if srcfiles:
596 instfunclines = [] 596 instfunclines = []
597 for newfile, origsrcfile in srcfiles.iteritems(): 597 for newfile, origsrcfile in srcfiles.items():
598 srcfile = origsrcfile 598 srcfile = origsrcfile
599 srcurientry = None 599 srcurientry = None
600 if not srcfile: 600 if not srcfile:
@@ -717,7 +717,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
717 if copyfiles: 717 if copyfiles:
718 if machine: 718 if machine:
719 destsubdir = os.path.join(destsubdir, machine) 719 destsubdir = os.path.join(destsubdir, machine)
720 for newfile, srcfile in copyfiles.iteritems(): 720 for newfile, srcfile in copyfiles.items():
721 filedest = os.path.join(appenddir, destsubdir, os.path.basename(srcfile)) 721 filedest = os.path.join(appenddir, destsubdir, os.path.basename(srcfile))
722 if os.path.abspath(newfile) != os.path.abspath(filedest): 722 if os.path.abspath(newfile) != os.path.abspath(filedest):
723 bb.note('Copying %s to %s' % (newfile, filedest)) 723 bb.note('Copying %s to %s' % (newfile, filedest))
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 01dce66..500122d 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -220,7 +220,7 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
220 for task in range(len(sq_fn)): 220 for task in range(len(sq_fn)):
221 if task not in ret: 221 if task not in ret:
222 for pn in self.lockedsigs: 222 for pn in self.lockedsigs:
223 if sq_hash[task] in self.lockedsigs[pn].itervalues(): 223 if sq_hash[task] in iter(self.lockedsigs[pn].values()):
224 if sq_task[task] == 'do_shared_workdir': 224 if sq_task[task] == 'do_shared_workdir':
225 continue 225 continue
226 sstate_missing_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?" 226 sstate_missing_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"