From: Michael Tremer Date: Sat, 28 Sep 2013 11:45:02 +0000 (+0200) Subject: Fix updating UsrMove packages. X-Git-Tag: 0.9.27~14^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb93662e71f78a960e02cf8bfeb812cfdef931db;p=pakfire.git Fix updating UsrMove packages. See #10424 for more information. --- diff --git a/src/pakfire/packages/installed.py b/src/pakfire/packages/installed.py index 1358ea052..6210c8887 100644 --- a/src/pakfire/packages/installed.py +++ b/src/pakfire/packages/installed.py @@ -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)