From 65a5ee7f60bb8ebca90e5358b6735f0a00f57edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Fri, 7 Jul 2006 00:20:38 +0000 Subject: [PATCH] Try to fix upgrade problem that arise with glibc... --- pisi/atomicoperations.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index 3c7f190c..81913695 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -260,15 +260,6 @@ class Install(AtomicOperation): config_changed = [] if self.reinstall: - # remove left over files - new = set(map(lambda x: str(x.path), self.files.list)) - old = set(map(lambda x: str(x.path), self.old_files.list)) - leftover = old - new - old_fileinfo = {} - for fileinfo in self.old_files.list: - old_fileinfo[str(fileinfo.path)] = fileinfo - for path in leftover: - Remove.remove_file( old_fileinfo[path] ) # handle special cases for upgrades overlap = old & new @@ -313,6 +304,18 @@ class Install(AtomicOperation): os.rename(path, path + '.newconfig') os.rename(path + '.old', path) + if self.reinstall: + # remove left over files + new = set(map(lambda x: str(x.path), self.files.list)) + old = set(map(lambda x: str(x.path), self.old_files.list)) + leftover = old - new + old_fileinfo = {} + for fileinfo in self.old_files.list: + old_fileinfo[str(fileinfo.path)] = fileinfo + for path in leftover: + Remove.remove_file( old_fileinfo[path] ) + + def store_pisi_files(self): """put files.xml, metadata.xml, actions.py and COMAR scripts somewhere in the file system. We'll need these in future..."""