From eb93662e71f78a960e02cf8bfeb812cfdef931db Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 28 Sep 2013 13:45:02 +0200 Subject: [PATCH] Fix updating UsrMove packages. See #10424 for more information. --- src/pakfire/packages/installed.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pakfire/packages/installed.py b/src/pakfire/packages/installed.py index 1358ea05..6210c888 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) -- 2.39.2