this filtering is overkill.. only symlink problem, so we can check this.

This commit is contained in:
Faik Uygur
2007-02-07 13:22:28 +00:00
parent 0026657e10
commit 834ccca426
2 changed files with 3 additions and 3 deletions
+3 -2
View File
@@ -300,8 +300,9 @@ class Install(AtomicOperation):
if not os.path.exists(destdir):
os.makedirs(destdir)
if os.path.islink(old_path):
os.symlink(os.readlink(old_path), new_path)
if os.path.islink(old_path):
if not os.path.exists(new_path):
os.symlink(os.readlink(old_path), new_path)
else:
shutil.copy(old_path, new_path)
-1
View File
@@ -118,7 +118,6 @@ def find_relocations(oldfiles, newfiles):
relocations = []
for hash in files_new.keys():
if hash in files_old:
files_new[hash] = filter(lambda x:x not in files_old[hash], files_new[hash])
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]))