]> git.ipfire.org Git - pakfire.git/commitdiff
Fix updating UsrMove packages.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 28 Sep 2013 11:45:02 +0000 (13:45 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 28 Sep 2013 11:45:02 +0000 (13:45 +0200)
See #10424 for more information.

src/pakfire/packages/installed.py

index 1358ea052799f403521c2dfd6c3d07228e576d9b..6210c888748f30ab637629979b04ebde3c6775df 100644 (file)
@@ -335,7 +335,14 @@ class DatabasePackage(Package):
                remove_files = []
 
                for f in files:
-                       if f.name in installed_files:
+                       # Try to find the if an other package owns the file.
+                       # Handles packages that move files from / to /usr.
+                       try:
+                               filename = os.path.abspath(f.name)
+                       except OSError:
+                               filename = f.name
+
+                       if filename in installed_files:
                                continue
 
                        remove_files.append(f)