summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-18 21:39:44 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:01 +0100
commit7eab022d4b484aec40998f95835ba46c5da168cf (patch)
treee88a3bf01eada7d44e41bfadee5721ce6ec198e0 /scripts/lib/recipetool/create.py
parent63404baadbfd1225bbb955f8c8f817073aef65d8 (diff)
downloadpoky-7eab022d4b484aec40998f95835ba46c5da168cf.tar.gz
scripts: Fix deprecated dict methods for python3
Replaced iteritems -> items, itervalues -> values, iterkeys -> keys or 'in' (From OE-Core rev: 25d4d8274bac696a484f83d7f3ada778cf95f4d0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r--scripts/lib/recipetool/create.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 4a59363eea..5a37d18209 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -61,8 +61,8 @@ class RecipeHandler(object):
61 libpaths = list(set([base_libdir, libdir])) 61 libpaths = list(set([base_libdir, libdir]))
62 libname_re = re.compile('^lib(.+)\.so.*$') 62 libname_re = re.compile('^lib(.+)\.so.*$')
63 pkglibmap = {} 63 pkglibmap = {}
64 for lib, item in shlib_providers.iteritems(): 64 for lib, item in shlib_providers.items():
65 for path, pkg in item.iteritems(): 65 for path, pkg in item.items():
66 if path in libpaths: 66 if path in libpaths:
67 res = libname_re.match(lib) 67 res = libname_re.match(lib)
68 if res: 68 if res:
@@ -74,7 +74,7 @@ class RecipeHandler(object):
74 74
75 # Now turn it into a library->recipe mapping 75 # Now turn it into a library->recipe mapping
76 pkgdata_dir = d.getVar('PKGDATA_DIR', True) 76 pkgdata_dir = d.getVar('PKGDATA_DIR', True)
77 for libname, pkg in pkglibmap.iteritems(): 77 for libname, pkg in pkglibmap.items():
78 try: 78 try:
79 with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f: 79 with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
80 for line in f: 80 for line in f:
@@ -663,7 +663,7 @@ def create_recipe(args):
663 else: 663 else:
664 extraoutdir = os.path.join(os.path.dirname(outfile), pn) 664 extraoutdir = os.path.join(os.path.dirname(outfile), pn)
665 bb.utils.mkdirhier(extraoutdir) 665 bb.utils.mkdirhier(extraoutdir)
666 for destfn, extrafile in extrafiles.iteritems(): 666 for destfn, extrafile in extrafiles.items():
667 shutil.move(extrafile, os.path.join(extraoutdir, destfn)) 667 shutil.move(extrafile, os.path.join(extraoutdir, destfn))
668 668
669 lines = lines_before 669 lines = lines_before
@@ -901,7 +901,7 @@ def split_pkg_licenses(licvalues, packages, outlines, fallback_licenses=None, pn
901 """ 901 """
902 pkglicenses = {pn: []} 902 pkglicenses = {pn: []}
903 for license, licpath, _ in licvalues: 903 for license, licpath, _ in licvalues:
904 for pkgname, pkgpath in packages.iteritems(): 904 for pkgname, pkgpath in packages.items():
905 if licpath.startswith(pkgpath + '/'): 905 if licpath.startswith(pkgpath + '/'):
906 if pkgname in pkglicenses: 906 if pkgname in pkglicenses:
907 pkglicenses[pkgname].append(license) 907 pkglicenses[pkgname].append(license)
@@ -928,7 +928,7 @@ def read_pkgconfig_provides(d):
928 for line in f: 928 for line in f:
929 pkgmap[os.path.basename(line.rstrip())] = os.path.splitext(os.path.basename(fn))[0] 929 pkgmap[os.path.basename(line.rstrip())] = os.path.splitext(os.path.basename(fn))[0]
930 recipemap = {} 930 recipemap = {}
931 for pc, pkg in pkgmap.iteritems(): 931 for pc, pkg in pkgmap.items():
932 pkgdatafile = os.path.join(pkgdatadir, 'runtime', pkg) 932 pkgdatafile = os.path.join(pkgdatadir, 'runtime', pkg)
933 if os.path.exists(pkgdatafile): 933 if os.path.exists(pkgdatafile):
934 with open(pkgdatafile, 'r') as f: 934 with open(pkgdatafile, 'r') as f: