classes/lib: Update xrange -> range for python3
xrange() no longer exists in python 3, use range() (From OE-Core rev: d022b4335100612d6596cc4c4956cb98ed5873cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
44e9a0d2fa
commit
642a997ade
|
@ -187,7 +187,7 @@ def sysroot_checkhashes(covered, tasknames, fnids, fns, d, invalidtasks = None):
|
||||||
problems = set()
|
problems = set()
|
||||||
configurefnids = set()
|
configurefnids = set()
|
||||||
if not invalidtasks:
|
if not invalidtasks:
|
||||||
invalidtasks = xrange(len(tasknames))
|
invalidtasks = range(len(tasknames))
|
||||||
for task in invalidtasks:
|
for task in invalidtasks:
|
||||||
if tasknames[task] == "do_configure" and task not in covered:
|
if tasknames[task] == "do_configure" and task not in covered:
|
||||||
configurefnids.add(fnids[task])
|
configurefnids.add(fnids[task])
|
||||||
|
|
|
@ -568,14 +568,14 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
|
||||||
raise Exception('Invalid extralines value passed')
|
raise Exception('Invalid extralines value passed')
|
||||||
|
|
||||||
def popline(varname):
|
def popline(varname):
|
||||||
for i in xrange(0, len(bbappendlines)):
|
for i in range(0, len(bbappendlines)):
|
||||||
if bbappendlines[i][0] == varname:
|
if bbappendlines[i][0] == varname:
|
||||||
line = bbappendlines.pop(i)
|
line = bbappendlines.pop(i)
|
||||||
return line
|
return line
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def appendline(varname, op, value):
|
def appendline(varname, op, value):
|
||||||
for i in xrange(0, len(bbappendlines)):
|
for i in range(0, len(bbappendlines)):
|
||||||
item = bbappendlines[i]
|
item = bbappendlines[i]
|
||||||
if item[0] == varname:
|
if item[0] == varname:
|
||||||
bbappendlines[i] = (item[0], item[1], item[2] + ' ' + value)
|
bbappendlines[i] = (item[0], item[1], item[2] + ' ' + value)
|
||||||
|
|
|
@ -50,7 +50,7 @@ fakeroot tar_sdk() {
|
||||||
DEST="./${SDK_ARCH}-${SDK_OS}"
|
DEST="./${SDK_ARCH}-${SDK_OS}"
|
||||||
mv sysroots/${SDK_SYS} $DEST
|
mv sysroots/${SDK_SYS} $DEST
|
||||||
rm sysroots -rf
|
rm sysroots -rf
|
||||||
patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} $DEST/usr/bin/patchelf
|
patchelf --set-interpreter ${@''.join('a' for n in range(1024))} $DEST/usr/bin/patchelf
|
||||||
mv $DEST/usr/bin/patchelf $DEST/usr/bin/patchelf-uninative
|
mv $DEST/usr/bin/patchelf $DEST/usr/bin/patchelf-uninative
|
||||||
tar ${SDKTAROPTS} -c -j --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
|
tar ${SDKTAROPTS} -c -j --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
|
||||||
}
|
}
|
||||||
|
|
|
@ -324,7 +324,7 @@ def run_cyclictest_suite():
|
||||||
t = time.time()
|
t = time.time()
|
||||||
max_list = []
|
max_list = []
|
||||||
|
|
||||||
for i in xrange(0, suite_size):
|
for i in range(0, suite_size):
|
||||||
tmp_min, tmp_avg, tmp_max = run_cyclictest_once()
|
tmp_min, tmp_avg, tmp_max = run_cyclictest_once()
|
||||||
|
|
||||||
msg = "%2d/%2d:" % (i+1, suite_size)
|
msg = "%2d/%2d:" % (i+1, suite_size)
|
||||||
|
|
|
@ -837,7 +837,7 @@ def _get_patchset_revs(args, srctree, recipe_path):
|
||||||
stdout, _ = bb.process.run('git rev-list --reverse %s..HEAD' %
|
stdout, _ = bb.process.run('git rev-list --reverse %s..HEAD' %
|
||||||
initial_rev, cwd=srctree)
|
initial_rev, cwd=srctree)
|
||||||
newcommits = stdout.split()
|
newcommits = stdout.split()
|
||||||
for i in xrange(min(len(commits), len(newcommits))):
|
for i in range(min(len(commits), len(newcommits))):
|
||||||
if newcommits[i] == commits[i]:
|
if newcommits[i] == commits[i]:
|
||||||
update_rev = commits[i]
|
update_rev = commits[i]
|
||||||
|
|
||||||
|
@ -863,7 +863,7 @@ def _remove_file_entries(srcuri, filelist):
|
||||||
entries = []
|
entries = []
|
||||||
for fname in filelist:
|
for fname in filelist:
|
||||||
basename = os.path.basename(fname)
|
basename = os.path.basename(fname)
|
||||||
for i in xrange(len(srcuri)):
|
for i in range(len(srcuri)):
|
||||||
if (srcuri[i].startswith('file://') and
|
if (srcuri[i].startswith('file://') and
|
||||||
os.path.basename(srcuri[i].split(';')[0]) == basename):
|
os.path.basename(srcuri[i].split(';')[0]) == basename):
|
||||||
entries.append(srcuri[i])
|
entries.append(srcuri[i])
|
||||||
|
|
Loading…
Reference in New Issue