mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
update_layer.py: rename confusing loop variables
Stop using "d" (sometimes multiple levels!) and use proper descriptive variable names instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
29c6458dca
commit
a6054920df
|
@ -312,9 +312,9 @@ def main():
|
||||||
# Check if any paths should be ignored because there are layers within this layer
|
# Check if any paths should be ignored because there are layers within this layer
|
||||||
removedirs = []
|
removedirs = []
|
||||||
for root, dirs, files in os.walk(layerdir):
|
for root, dirs, files in os.walk(layerdir):
|
||||||
for d in dirs:
|
for diritem in dirs:
|
||||||
if os.path.exists(os.path.join(root, d, 'conf', 'layer.conf')):
|
if os.path.exists(os.path.join(root, diritem, 'conf', 'layer.conf')):
|
||||||
removedirs.append(os.path.join(root, d) + os.sep)
|
removedirs.append(os.path.join(root, diritem) + os.sep)
|
||||||
|
|
||||||
if diff:
|
if diff:
|
||||||
# Apply git changes to existing recipe list
|
# Apply git changes to existing recipe list
|
||||||
|
@ -325,12 +325,12 @@ def main():
|
||||||
subdir_start = ""
|
subdir_start = ""
|
||||||
|
|
||||||
updatedrecipes = set()
|
updatedrecipes = set()
|
||||||
for d in diff.iter_change_type('D'):
|
for diffitem in diff.iter_change_type('D'):
|
||||||
path = d.a_blob.path
|
path = diffitem.a_blob.path
|
||||||
if path.startswith(subdir_start):
|
if path.startswith(subdir_start):
|
||||||
skip = False
|
skip = False
|
||||||
for d in removedirs:
|
for removedir in removedirs:
|
||||||
if path.startswith(d):
|
if path.startswith(removedir):
|
||||||
skip = True
|
skip = True
|
||||||
break
|
break
|
||||||
if skip:
|
if skip:
|
||||||
|
@ -351,12 +351,12 @@ def main():
|
||||||
elif typename == 'bbclass':
|
elif typename == 'bbclass':
|
||||||
layerclasses.filter(name=filename).delete()
|
layerclasses.filter(name=filename).delete()
|
||||||
|
|
||||||
for d in diff.iter_change_type('A'):
|
for diffitem in diff.iter_change_type('A'):
|
||||||
path = d.b_blob.path
|
path = diffitem.b_blob.path
|
||||||
if path.startswith(subdir_start):
|
if path.startswith(subdir_start):
|
||||||
skip = False
|
skip = False
|
||||||
for d in removedirs:
|
for removedir in removedirs:
|
||||||
if path.startswith(d):
|
if path.startswith(removedir):
|
||||||
skip = True
|
skip = True
|
||||||
break
|
break
|
||||||
if skip:
|
if skip:
|
||||||
|
@ -385,12 +385,12 @@ def main():
|
||||||
bbclass.save()
|
bbclass.save()
|
||||||
|
|
||||||
dirtyrecipes = set()
|
dirtyrecipes = set()
|
||||||
for d in diff.iter_change_type('M'):
|
for diffitem in diff.iter_change_type('M'):
|
||||||
path = d.a_blob.path
|
path = diffitem.a_blob.path
|
||||||
if path.startswith(subdir_start):
|
if path.startswith(subdir_start):
|
||||||
skip = False
|
skip = False
|
||||||
for d in removedirs:
|
for removedir in removedirs:
|
||||||
if path.startswith(d):
|
if path.startswith(removedir):
|
||||||
skip = True
|
skip = True
|
||||||
break
|
break
|
||||||
if skip:
|
if skip:
|
||||||
|
@ -432,8 +432,8 @@ def main():
|
||||||
fullpath = os.path.join(root, v['filename'])
|
fullpath = os.path.join(root, v['filename'])
|
||||||
preserve = True
|
preserve = True
|
||||||
if os.path.exists(fullpath):
|
if os.path.exists(fullpath):
|
||||||
for d in removedirs:
|
for removedir in removedirs:
|
||||||
if fullpath.startswith(d):
|
if fullpath.startswith(removedir):
|
||||||
preserve = False
|
preserve = False
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
@ -455,10 +455,10 @@ def main():
|
||||||
for root, dirs, files in os.walk(layerdir):
|
for root, dirs, files in os.walk(layerdir):
|
||||||
if '.git' in dirs:
|
if '.git' in dirs:
|
||||||
dirs.remove('.git')
|
dirs.remove('.git')
|
||||||
for d in dirs[:]:
|
for diritem in dirs[:]:
|
||||||
fullpath = os.path.join(root, d) + os.sep
|
fullpath = os.path.join(root, diritem) + os.sep
|
||||||
if fullpath in removedirs:
|
if fullpath in removedirs:
|
||||||
dirs.remove(d)
|
dirs.remove(diritem)
|
||||||
for f in files:
|
for f in files:
|
||||||
fullpath = os.path.join(root, f)
|
fullpath = os.path.join(root, f)
|
||||||
(typename, _, filename) = recipeparse.detect_file_type(fullpath, layerdir_start)
|
(typename, _, filename) = recipeparse.detect_file_type(fullpath, layerdir_start)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user