From c3e32603cb1dc79e72d7e222cc7dc77a9745eda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= Date: Sat, 17 Jan 2009 15:01:02 +0000 Subject: [PATCH] Make a distinction between /usr/lib and /usr/libexec while checking for abandoned files. Say that there exists a '/usr/libexec/hal_lpadmin' in the installDIR of the package but '/usr/libexec' is not written to the Files section of the pspec.xml. If there's another path '/usr/lib' written in the Files section, the string method find() used in get_abandoned_files() matches '/usr/libexec' because they have exactly the same beginning. This can either be fixed by postfixing all the directory paths in pspec.xml's with '/' or appending a '/' during the abandoned files checking procedure. Thanks to Gokmen Gorgen for reporting this erratic behaviour. --- ChangeLog | 6 ++++++ pisi/operations/build.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a1e8cb3f..bc73fc9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-17 Ozan Çağlayan + * pisi/operations/build.py (get_abandoned_files): Delimit the paths + written in pspec.xml's Files section with a trailing '/' for not + matching similar patterns like /usr/lib and /usr/libexec during + abandoned files checking. + 2009-01-14 Ozan Çağlayan * pisi/cli/listavailable.py (print_packages): Resize the first column dynamically according to the longest package name (#9021) and fix some diff --git a/pisi/operations/build.py b/pisi/operations/build.py index 8f917f31..f5992618 100644 --- a/pisi/operations/build.py +++ b/pisi/operations/build.py @@ -376,7 +376,7 @@ class Builder: for root, dirs, files in os.walk(install_dir): for file_ in files: already_in_package = False - fpath = pisi.util.join_path(root, file_) + fpath = pisi.util.join_path(root, file_) + '/' for path in all_paths_in_packages: if not fpath.find(path): already_in_package = True