image/kernel-module-split/eglibc-ld.inc: Remove has_key() usage
The has_key() attribute has been removed in python 3 since there is better syntax available. Use the improved syntax. (From OE-Core rev: 3dff13793e875ff58cc38c4a960caca9b6969843) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
e16faa55da
commit
534325fd1f
|
@ -368,7 +368,7 @@ for dir in dirs.split():
|
||||||
key=str(os.path.join("/",os.path.relpath(item,dir)))
|
key=str(os.path.join("/",os.path.relpath(item,dir)))
|
||||||
|
|
||||||
valid=True;
|
valid=True;
|
||||||
if files.has_key(key):
|
if key in files:
|
||||||
#check whether the file is allow to replace
|
#check whether the file is allow to replace
|
||||||
if allow_rep.match(key):
|
if allow_rep.match(key):
|
||||||
valid=True
|
valid=True
|
||||||
|
|
|
@ -109,7 +109,7 @@ python split_kernel_module_packages () {
|
||||||
# instead is prefixed with /lib/modules/${KERNEL_VERSION}
|
# instead is prefixed with /lib/modules/${KERNEL_VERSION}
|
||||||
file = file.replace("/lib/modules/%s/" % d.getVar('KERNEL_VERSION', True) or '', '', 1)
|
file = file.replace("/lib/modules/%s/" % d.getVar('KERNEL_VERSION', True) or '', '', 1)
|
||||||
|
|
||||||
if module_deps.has_key(file):
|
if file in module_deps:
|
||||||
dependencies = []
|
dependencies = []
|
||||||
for i in module_deps[file]:
|
for i in module_deps[file]:
|
||||||
m = re.match(pattern, os.path.basename(i))
|
m = re.match(pattern, os.path.basename(i))
|
||||||
|
@ -153,7 +153,7 @@ python split_kernel_module_packages () {
|
||||||
files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
|
files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
|
||||||
d.setVar('FILES_%s' % pkg, files)
|
d.setVar('FILES_%s' % pkg, files)
|
||||||
|
|
||||||
if vals.has_key("description"):
|
if "description" in vals:
|
||||||
old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
|
old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
|
||||||
d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
|
d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
|
||||||
for i in range(len(datainfo)):
|
for i in range(len(datainfo)):
|
||||||
pkgarch = datainfo[i]['pkgarch']
|
pkgarch = datainfo[i]['pkgarch']
|
||||||
value = datainfo[i]['value']
|
value = datainfo[i]['value']
|
||||||
if not idx.has_key(pkgarch):
|
if pkgarch not in idx:
|
||||||
idx[pkgarch] = i
|
idx[pkgarch] = i
|
||||||
elif value > datainfo[idx[pkgarch]]['value']:
|
elif value > datainfo[idx[pkgarch]]['value']:
|
||||||
idx[pkgarch] = i
|
idx[pkgarch] = i
|
||||||
|
|
|
@ -93,7 +93,7 @@ class ELFFile:
|
||||||
import bb.process
|
import bb.process
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if self.objdump_output.has_key(cmd):
|
if cmd in self.objdump_output:
|
||||||
return self.objdump_output[cmd]
|
return self.objdump_output[cmd]
|
||||||
|
|
||||||
objdump = d.getVar('OBJDUMP', True)
|
objdump = d.getVar('OBJDUMP', True)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
def ld_append_if_tune_exists(d, infos, dict):
|
def ld_append_if_tune_exists(d, infos, dict):
|
||||||
tune = d.getVar("DEFAULTTUNE", True) or ""
|
tune = d.getVar("DEFAULTTUNE", True) or ""
|
||||||
libdir = d.getVar("base_libdir", True) or ""
|
libdir = d.getVar("base_libdir", True) or ""
|
||||||
if dict.has_key(tune):
|
if tune in dict:
|
||||||
infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }')
|
infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }')
|
||||||
infos['lddrewrite'].add(libdir+'/'+dict[tune][0])
|
infos['lddrewrite'].add(libdir+'/'+dict[tune][0])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue