From 77c6572c7d450768443fe7f81a7c4e087047f19e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 13 May 2007 23:41:31 +0000 Subject: [PATCH] /usr/lib/pardus/pisi/delta.py:77: (file) shadows builtin /usr/lib/pardus/pisi/delta.py:102: (file) shadows builtin /usr/lib/pardus/pisi/delta.py:110: (hash) shadows builtin /usr/lib/pardus/pisi/delta.py:118: (file) shadows builtin /usr/lib/pardus/pisi/delta.py:122: (file) shadows builtin /usr/lib/pardus/pisi/delta.py:126: (hash) shadows builtin --- pisi/delta.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pisi/delta.py b/pisi/delta.py index d0e81ba9..d5c1d236 100644 --- a/pisi/delta.py +++ b/pisi/delta.py @@ -74,8 +74,8 @@ def create_delta_package(old_package, new_package): ctx.build_leftover = util.join_path(ctx.config.tmp_dir(), ctx.const.install_tar_lzma) tar = archive.ArchiveTar(util.join_path(ctx.config.tmp_dir(), ctx.const.install_tar_lzma), "tarlzma") - for file in files_delta: - tar.add_to_archive(file.path) + for f in files_delta: + tar.add_to_archive(f.path) tar.close() os.chdir(ctx.config.tmp_dir()) @@ -99,34 +99,34 @@ def create_delta_package(old_package, new_package): def find_delta(oldfiles, newfiles): hashto_files = {} - for file in newfiles.list: - hashto_files.setdefault(file.hash, []).append(file) + for f in newfiles.list: + hashto_files.setdefault(f.hash, []).append(f) files_new = sets.Set(map(lambda x:x.hash, newfiles.list)) files_old = sets.Set(map(lambda x:x.hash, oldfiles.list)) files_delta = files_new - files_old deltas = [] - for hash in files_delta: - deltas.extend(hashto_files[hash]) + for h in files_delta: + deltas.extend(hashto_files[h]) return deltas def find_relocations(oldfiles, newfiles): files_new = {} - for file in newfiles.list: - files_new.setdefault(file.hash, []).append(file) + for f in newfiles.list: + files_new.setdefault(f.hash, []).append(f) files_old = {} - for file in oldfiles.list: - files_old.setdefault(file.hash, []).append(file) + for f in oldfiles.list: + files_old.setdefault(f.hash, []).append(f) relocations = [] - for hash in files_new.keys(): - if hash and hash in files_old: - for i in range(len(files_new[hash])): - if files_old[hash][0].path != files_new[hash][i].path: - relocations.append((files_old[hash][0], files_new[hash][i])) + for h in files_new.keys(): + if h and h in files_old: + for i in range(len(files_new[h])): + if files_old[h][0].path != files_new[h][i].path: + relocations.append((files_old[h][0], files_new[h][i])) return relocations