]> git.ipfire.org Git - pakfire.git/commitdiff
Fix for replacing packages.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Aug 2011 14:00:51 +0000 (16:00 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Aug 2011 14:00:51 +0000 (16:00 +0200)
Sometimes, we replace a package by another one with a different
name, which causes that the original package is removed.
By removing, we delete all files, that may be owned by the
new package, which is not recognized as a "to be replaced" package
and all files are removed.
So, we now do a diff against the whole file database to check
if an other package owns a file, we want to remove. If so,
we let this file be where it is.

pakfire/actions.py

index 9a6c5c2e178dce946f674aee58e0f97c8473182e..e0bf678908bae0467f1976c72ebe792b4b8771a9 100644 (file)
@@ -144,7 +144,7 @@ class ActionRemove(Action):
                assert self.pkg
 
        def run(self):
-               self.pkg.remove(_("Removing"), prefix=self.pakfire.path)
+               self.pkg.cleanup(_("Removing"), prefix=self.pakfire.path)
 
                # Remove package from the database.
                self.local.rem_package(self.pkg)