From f290b85cd799e4e8f9a7821a886cf862fa93ddf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serdar=20Dalg=C4=B1=C3=A7?= Date: Mon, 22 Feb 2010 06:47:48 +0000 Subject: [PATCH] Use glob.glob0 and lstrip instead of glob.glob. Typos in filePaths in pspec.xml were sometimes ignored and abandoned files were not succesfully caught in some cases. Now it is fixed. Thanks Fatih for the collaboration. --- ChangeLog | 6 ++++++ pisi/operations/build.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ac333d58..1593f70f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-12 Serdar Dalgıç + * pisi/operations/build.py: Use glob.glob0 and lstrip instead of + glob.glob. Typos in filePaths in pspec.xml were sometimes ignored and + abandoned files were not succesfully caught in some cases. Now it is + fixed. Thanks Fatih for the collaboration. + 2010-02-12 Gökçen Eraslan * pisi/actionsapi/shelltools.py: Replace FileError with ctx.ui.error since FileError is defined in pisitoolsfunctions. diff --git a/pisi/operations/build.py b/pisi/operations/build.py index 7e8ed768..93a60a7f 100644 --- a/pisi/operations/build.py +++ b/pisi/operations/build.py @@ -59,7 +59,7 @@ def get_file_type(path, pinfo_list, install_dir): """Return the file type of a path according to the given PathInfo list""" - Match = lambda x: [match for match in glob.glob(install_dir + x) if pisi.util.join_path(install_dir, path).find(match) > -1] + Match = lambda x: [match for match in glob.glob0(install_dir, x.lstrip("/")) if pisi.util.join_path(install_dir, path).find(match) > -1] def Sort(x): x.sort(reverse=True)