]> git.ipfire.org Git - pakfire.git/commitdiff
Remove database if it is equal to an existing one.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 Feb 2011 13:38:07 +0000 (14:38 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 Feb 2011 13:38:07 +0000 (14:38 +0100)
pakfire/repository/index.py

index 44c9d4dbc2456358fbb0b8d069ba1c9d2089bad3..9d38c6479bd60d3d33a39d2fd49e87e9971b4dfb 100644 (file)
@@ -233,6 +233,8 @@ class LocalIndex(DatabaseIndexFactory):
 
                if not os.path.exists(db_path2):
                        shutil.move(db_path, db_path2)
+               else:
+                       os.unlink(db_path)
 
                # Create a new metadata object and add out information to it.
                md = metadata.Metadata(self.pakfire, self)