From 302188b1690e68333a3768f2a6d261559e81ca0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Oudompheng?= Date: Tue, 28 Sep 2010 12:16:25 +1000 Subject: [PATCH 1/2] Make testsuite python-2.7 compatible os.walk(".") adds a prefix of "./" to filenames in python-2.7 which causes libalpm not to like archives generated in the testsuite resulting in widespread failure. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- test/pacman/pmpkg.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index 48d79a35..1d55175e 100755 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -164,14 +164,8 @@ class pmpkg: # Generate package archive tar = tarfile.open(self.path, "w:gz") - - # package files - for root, dirs, files in os.walk('.'): - for d in dirs: - tar.add(os.path.join(root, d), recursive=False) - for f in files: - tar.add(os.path.join(root, f)) - + for i in os.listdir("."): + tar.add(i) tar.close() os.chdir(curdir) From 283ef6519aa20b8c63c9b916573b5f243ff7be2e Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Sep 2010 01:59:10 +1000 Subject: [PATCH 2/2] Check for python-2.7 Add python-2.7 to the list of checked versions of python and add a check for a python2 binary before resorting to the unversioned python binary. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6f9f9a96..82cecbaf 100644 --- a/configure.ac +++ b/configure.ac @@ -126,7 +126,7 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_LIBTOOL -AC_CHECK_PROGS([PYTHON], [python2.6 python2.5 python], [false]) +AC_CHECK_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2 python], [false]) # find installed gettext AM_GNU_GETTEXT([external])