From: Michael Tremer Date: Sun, 27 Feb 2011 13:38:07 +0000 (+0100) Subject: Remove database if it is equal to an existing one. X-Git-Tag: 0.9.3~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76d37e72eeb50e9c53793fa0ff051555a811f9ce;p=pakfire.git Remove database if it is equal to an existing one. --- diff --git a/pakfire/repository/index.py b/pakfire/repository/index.py index 44c9d4dbc..9d38c6479 100644 --- a/pakfire/repository/index.py +++ b/pakfire/repository/index.py @@ -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)