[pacman-dev] [PATCH 0/2] two minor fixes to the build
One: get VPATH builds working again. Two: use $(PYTHON) instead of #!/usr/bin/python2 to run tests. Jeremy Heiner (2): GNU make $(wildcard) assumes $(builddir) for relative paths. Use the 'configure'd PYTHON to run pactest. Makefile.am | 7 ++++--- test/pacman/README | 4 ++-- test/pacman/pactest.py | 2 +- test/pacman/pmdb.py | 1 - test/pacman/pmenv.py | 1 - test/pacman/pmfile.py | 1 - test/pacman/pmpkg.py | 1 - test/pacman/pmrule.py | 1 - test/pacman/pmtest.py | 1 - test/pacman/tests/Makefile.am | 4 ++-- test/pacman/tests/sync200.py.in | 1 + test/pacman/util.py | 1 - 12 files changed, 10 insertions(+), 15 deletions(-) mode change 100755 => 100644 test/pacman/pactest.py -- 1.8.5.2
So to allow VPATH builds $(srcdir) must be prepended for the globbing and then immediately stripped back off to enable directory searching. Without this patch 'sync200.py.in' is not found in $(build_dir) in a VPATH build, causing 'make check' to abort. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> --- Makefile.am | 5 +++-- test/pacman/tests/Makefile.am | 4 ++-- test/pacman/tests/sync200.py.in | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4d5adae..6396d23 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,8 +23,9 @@ dist_pkgdata_DATA = \ proto/proto.install \ proto/ChangeLog.proto -$(top_srcdir)/test/pacman/tests/TESTS: $(wildcard test/pacman/tests/*.py*) - @printf "TESTS += %s\n" $^ | sed -e "s/\.py\.in/.py/" | LC_ALL=C sort -u > "$@" +$(top_srcdir)/test/pacman/tests/TESTS: $(top_srcdir)/test/pacman/tests/*.py* + @echo " GEN $@" + @printf "TESTS += %s\n" $(patsubst %.py.in,%.py,$(patsubst $(top_srcdir)/%,%,$^)) | LC_ALL=C sort -u > "$@" TESTS = test/scripts/parseopts_test.sh \ test/scripts/human_to_size_test.sh \ diff --git a/test/pacman/tests/Makefile.am b/test/pacman/tests/Makefile.am index 9ab0c77..c26a4a8 100644 --- a/test/pacman/tests/Makefile.am +++ b/test/pacman/tests/Makefile.am @@ -1,7 +1,7 @@ -CONFTESTS = $(patsubst %py.in,%py,$(wildcard *.py.in)) +CONFTESTS = $(patsubst $(srcdir)/%py.in,%py,$(wildcard $(srcdir)/*.py.in)) check_SCRIPTS = \ - $(wildcard *.py) \ + $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/*.py)) \ $(CONFTESTS) noinst_SCRIPTS = $(check_SCRIPTS) diff --git a/test/pacman/tests/sync200.py.in b/test/pacman/tests/sync200.py.in index 6e47112..b6f05df 100644 --- a/test/pacman/tests/sync200.py.in +++ b/test/pacman/tests/sync200.py.in @@ -1,4 +1,5 @@ self.description = "Synchronize the local database" +# @configure_input@ if len("@LIBCURL@") == 0: self.option['XferCommand'] = ['/usr/bin/curl %u > %o'] -- 1.8.5.2
On Thu, Dec 19, 2013 at 03:30:59PM -0500, Jeremy Heiner wrote:
So to allow VPATH builds $(srcdir) must be prepended for the globbing and then immediately stripped back off to enable directory searching. Without this patch 'sync200.py.in' is not found in $(build_dir) in a VPATH build, causing 'make check' to abort.
Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> ---
How did you encounter this? 'make distcheck' passes for me on master currently, and this does a VPATH build which includes 'make check'.
Makefile.am | 5 +++-- test/pacman/tests/Makefile.am | 4 ++-- test/pacman/tests/sync200.py.in | 1 + 3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 4d5adae..6396d23 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,8 +23,9 @@ dist_pkgdata_DATA = \ proto/proto.install \ proto/ChangeLog.proto
-$(top_srcdir)/test/pacman/tests/TESTS: $(wildcard test/pacman/tests/*.py*) - @printf "TESTS += %s\n" $^ | sed -e "s/\.py\.in/.py/" | LC_ALL=C sort -u > "$@" +$(top_srcdir)/test/pacman/tests/TESTS: $(top_srcdir)/test/pacman/tests/*.py* + @echo " GEN $@" + @printf "TESTS += %s\n" $(patsubst %.py.in,%.py,$(patsubst $(top_srcdir)/%,%,$^)) | LC_ALL=C sort -u > "$@"
TESTS = test/scripts/parseopts_test.sh \ test/scripts/human_to_size_test.sh \ diff --git a/test/pacman/tests/Makefile.am b/test/pacman/tests/Makefile.am index 9ab0c77..c26a4a8 100644 --- a/test/pacman/tests/Makefile.am +++ b/test/pacman/tests/Makefile.am @@ -1,7 +1,7 @@ -CONFTESTS = $(patsubst %py.in,%py,$(wildcard *.py.in)) +CONFTESTS = $(patsubst $(srcdir)/%py.in,%py,$(wildcard $(srcdir)/*.py.in))
check_SCRIPTS = \ - $(wildcard *.py) \ + $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/*.py)) \ $(CONFTESTS)
noinst_SCRIPTS = $(check_SCRIPTS) diff --git a/test/pacman/tests/sync200.py.in b/test/pacman/tests/sync200.py.in index 6e47112..b6f05df 100644 --- a/test/pacman/tests/sync200.py.in +++ b/test/pacman/tests/sync200.py.in @@ -1,4 +1,5 @@ self.description = "Synchronize the local database" +# @configure_input@
if len("@LIBCURL@") == 0: self.option['XferCommand'] = ['/usr/bin/curl %u > %o'] -- 1.8.5.2
On Thu, Dec 19, 2013 at 3:51 PM, Dave Reisner <d@falconindy.com> wrote:
How did you encounter this? 'make distcheck' passes for me on master currently, and this does a VPATH build which includes 'make check'.
Here are the steps I just used to recreate the problem: cd <top_srcdir> git checkout master git clean -Xdi git status --ignored ./autogen.sh mkdir ../clean cd ../clean ../<git>/configure make make check All the tests except sync200 run, then make fails with: make[4]: Nothing to be done for 'test/pacman/tests/sync200.log'. fatal: making test-suite.log: failed to create test/pacman/tests/sync200.trs fatal: making test-suite.log: failed to create test/pacman/tests/sync200.log Makefile:1035: recipe for target 'test-suite.log' failed I'm guessing your working dir has a copy of sync200.py which isn't getting cleaned before distcheck does its thing? Jeremy
On Thu, Dec 19, 2013 at 4:24 PM, Jeremy Heiner <scalaprotractor@gmail.com> wrote:
I'm guessing your working dir has a copy of sync200.py which isn't getting cleaned before distcheck does its thing?
Hrmm... distclean properly removes the generated sync200.py, so my guess has to be wrong. Right? I've got no other ideas, but am very curious to learn what's causing this.
On Thu, Dec 19, 2013 at 04:24:00PM -0500, Jeremy Heiner wrote:
On Thu, Dec 19, 2013 at 3:51 PM, Dave Reisner <d@falconindy.com> wrote:
How did you encounter this? 'make distcheck' passes for me on master currently, and this does a VPATH build which includes 'make check'.
Here are the steps I just used to recreate the problem:
cd <top_srcdir> git checkout master git clean -Xdi git status --ignored ./autogen.sh mkdir ../clean cd ../clean ../<git>/configure make make check
All the tests except sync200 run, then make fails with:
make[4]: Nothing to be done for 'test/pacman/tests/sync200.log'. fatal: making test-suite.log: failed to create test/pacman/tests/sync200.trs fatal: making test-suite.log: failed to create test/pacman/tests/sync200.log Makefile:1035: recipe for target 'test-suite.log' failed
Thanks, I can reproduce the failure with this recipe.
I'm guessing your working dir has a copy of sync200.py which isn't getting cleaned before distcheck does its thing? Jeremy
Something like that. Personally, I'd rather we get rid of the wildcard matching and just add an explicit list of tests along with a build rule for %.py.in to %.py. I'd suspect that this won't be the last time being cavalier about what the buildsys includes in the dist tarball and what tests are run bites us in the ass. d
On 20/12/13 07:58, Dave Reisner wrote:
On Thu, Dec 19, 2013 at 04:24:00PM -0500, Jeremy Heiner wrote:
On Thu, Dec 19, 2013 at 3:51 PM, Dave Reisner <d@falconindy.com> wrote:
How did you encounter this? 'make distcheck' passes for me on master currently, and this does a VPATH build which includes 'make check'.
Here are the steps I just used to recreate the problem:
cd <top_srcdir> git checkout master git clean -Xdi git status --ignored ./autogen.sh mkdir ../clean cd ../clean ../<git>/configure make make check
All the tests except sync200 run, then make fails with:
make[4]: Nothing to be done for 'test/pacman/tests/sync200.log'. fatal: making test-suite.log: failed to create test/pacman/tests/sync200.trs fatal: making test-suite.log: failed to create test/pacman/tests/sync200.log Makefile:1035: recipe for target 'test-suite.log' failed
Thanks, I can reproduce the failure with this recipe.
I'm guessing your working dir has a copy of sync200.py which isn't getting cleaned before distcheck does its thing? Jeremy
Something like that.
Personally, I'd rather we get rid of the wildcard matching and just add an explicit list of tests along with a build rule for %.py.in to %.py. I'd suspect that this won't be the last time being cavalier about what the buildsys includes in the dist tarball and what tests are run bites us in the ass.
OK - that sounds a proper fix. Someone do that! Allan
On Dec 20, 2013 7:49 AM, "Allan McRae" <allan@archlinux.org> wrote:
On 20/12/13 07:58, Dave Reisner wrote:
On Thu, Dec 19, 2013 at 04:24:00PM -0500, Jeremy Heiner wrote:
On Thu, Dec 19, 2013 at 3:51 PM, Dave Reisner <d@falconindy.com> wrote:
How did you encounter this? 'make distcheck' passes for me on master currently, and this does a VPATH build which includes 'make check'.
Here are the steps I just used to recreate the problem:
cd <top_srcdir> git checkout master git clean -Xdi git status --ignored ./autogen.sh mkdir ../clean cd ../clean ../<git>/configure make make check
All the tests except sync200 run, then make fails with:
make[4]: Nothing to be done for 'test/pacman/tests/sync200.log'. fatal: making test-suite.log: failed to create
test/pacman/tests/sync200.trs
fatal: making test-suite.log: failed to create test/pacman/tests/sync200.log Makefile:1035: recipe for target 'test-suite.log' failed
Thanks, I can reproduce the failure with this recipe.
I'm guessing your working dir has a copy of sync200.py which isn't getting cleaned before distcheck does its thing? Jeremy
Something like that.
Personally, I'd rather we get rid of the wildcard matching and just add an explicit list of tests along with a build rule for %.py.in to %.py. I'd suspect that this won't be the last time being cavalier about what the buildsys includes in the dist tarball and what tests are run bites us in the ass.
OK - that sounds a proper fix. Someone do that!
I can send a patch in a bit
Allan
Instead of the one hard-coded (with '#!') in pactest.py. Remove the '#!', chmod -x, and comment to discourage well-intentioned reversion. Update README. Remove useless '#!' from non-main .py files. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> --- Makefile.am | 2 +- test/pacman/README | 4 ++-- test/pacman/pactest.py | 2 +- test/pacman/pmdb.py | 1 - test/pacman/pmenv.py | 1 - test/pacman/pmfile.py | 1 - test/pacman/pmpkg.py | 1 - test/pacman/pmrule.py | 1 - test/pacman/pmtest.py | 1 - test/pacman/util.py | 1 - 10 files changed, 4 insertions(+), 11 deletions(-) mode change 100755 => 100644 test/pacman/pactest.py diff --git a/Makefile.am b/Makefile.am index 6396d23..6620fbf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,7 @@ LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ $(top_srcdir)/build-aux/tap-driver.sh PY_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ $(top_srcdir)/build-aux/tap-driver.sh -PY_LOG_COMPILER = $(top_srcdir)/test/pacman/pactest.py +PY_LOG_COMPILER = $(PYTHON) $(top_srcdir)/test/pacman/pactest.py AM_PY_LOG_FLAGS = \ --scriptlet-shell $(SCRIPTLET_SHELL) \ --ldconfig $(LDCONFIG) \ diff --git a/test/pacman/README b/test/pacman/README index c7aeb10..f111cd6 100644 --- a/test/pacman/README +++ b/test/pacman/README @@ -55,12 +55,12 @@ Usage pactest will run the suite of test files passed as arguments. Example: - ./pactest.py tests/*.py + python2.7 pactest.py tests/*.py This example will run all tests from the "tests" directory. Use the "help" option to get the full list of parameters: - ./pactest.py --help + python2.7 pactest.py --help The following pieces of software are required to run the pactest suite: diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py old mode 100755 new mode 100644 index e21cde7..46aa913 --- a/test/pacman/pactest.py +++ b/test/pacman/pactest.py @@ -1,4 +1,4 @@ -#! /usr/bin/python2 +# (no '#!' here because configure picks PYTHON) # # pactest : run automated testing on the pacman binary # diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py index 53de91e..61be95f 100644 --- a/test/pacman/pmdb.py +++ b/test/pacman/pmdb.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmenv.py b/test/pacman/pmenv.py index f358285..e375ba0 100644 --- a/test/pacman/pmenv.py +++ b/test/pacman/pmenv.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Developmet Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmfile.py b/test/pacman/pmfile.py index 49c0274..4d5d210 100644 --- a/test/pacman/pmfile.py +++ b/test/pacman/pmfile.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index 6f7ae6e..5025f38 100644 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py index cfcbb6b..38060eb 100644 --- a/test/pacman/pmrule.py +++ b/test/pacman/pmrule.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py index a1f3645d..b201db4 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/util.py b/test/pacman/util.py index ab5a6f4..f79c4bd 100644 --- a/test/pacman/util.py +++ b/test/pacman/util.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> -- 1.8.5.2
On 12/19/13 at 03:31pm, Jeremy Heiner wrote:
Instead of the one hard-coded (with '#!') in pactest.py. Remove the '#!', chmod -x, and comment to discourage well-intentioned reversion. Update README. Remove useless '#!' from non-main .py files.
Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> ---
<snip>
diff --git a/test/pacman/README b/test/pacman/README index c7aeb10..f111cd6 100644 --- a/test/pacman/README +++ b/test/pacman/README @@ -55,12 +55,12 @@ Usage pactest will run the suite of test files passed as arguments.
Example: - ./pactest.py tests/*.py + python2.7 pactest.py tests/*.py
This example will run all tests from the "tests" directory.
Use the "help" option to get the full list of parameters: - ./pactest.py --help + python2.7 pactest.py --help
The following pieces of software are required to run the pactest suite:
diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py old mode 100755 new mode 100644 index e21cde7..46aa913 --- a/test/pacman/pactest.py +++ b/test/pacman/pactest.py @@ -1,4 +1,4 @@ -#! /usr/bin/python2 +# (no '#!' here because configure picks PYTHON)
What is the point of removing this shebang and changing the mode? The only thing that accomplishes is making it impossible to run directly.
# # pactest : run automated testing on the pacman binary # diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py index 53de91e..61be95f 100644 --- a/test/pacman/pmdb.py +++ b/test/pacman/pmdb.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 #
No need to leave these lone '#'.
# Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org>
On Thu, Dec 19, 2013 at 11:35 PM, Andrew Gregory <andrew.gregory.8@gmail.com> wrote:
On 12/19/13 at 03:31pm, Jeremy Heiner wrote:
-#! /usr/bin/python2 +# (no '#!' here because configure picks PYTHON)
What is the point of removing this shebang and changing the mode? The only thing that accomplishes is making it impossible to run directly.
The intent was stated in the commit message as "to discourage well-intentioned reversion"... I.e. without this change it is more likely in the future that someone will submit a patch that says "Makefile.am can be made simpler by removing the $(PYTHON) from PY_LOG_COMPILER since pactest.py is executable." Besides, I wager you and me are the only ones who have run pactest directly in the past 6 months. It's just so much more pleasant to let 'make check' run it and format the output nicely.
-#! /usr/bin/python2 #
No need to leave these lone '#'.
No need to take them out, either. Jeremy
On 20/12/13 15:30, Jeremy Heiner wrote:
On Thu, Dec 19, 2013 at 11:35 PM, Andrew Gregory <andrew.gregory.8@gmail.com> wrote:
On 12/19/13 at 03:31pm, Jeremy Heiner wrote:
-#! /usr/bin/python2 +# (no '#!' here because configure picks PYTHON)
What is the point of removing this shebang and changing the mode? The only thing that accomplishes is making it impossible to run directly.
The intent was stated in the commit message as "to discourage well-intentioned reversion"... I.e. without this change it is more likely in the future that someone will submit a patch that says "Makefile.am can be made simpler by removing the $(PYTHON) from PY_LOG_COMPILER since pactest.py is executable." Besides, I wager you and me are the only ones who have run pactest directly in the past 6 months. It's just so much more pleasant to let 'make check' run it and format the output nicely.
I'll take that wager! $ history | grep pactest.py | wc -l 146 Allan
On 20/12/13 21:22, Allan McRae wrote:
On 20/12/13 15:30, Jeremy Heiner wrote:
On Thu, Dec 19, 2013 at 11:35 PM, Andrew Gregory <andrew.gregory.8@gmail.com> wrote:
On 12/19/13 at 03:31pm, Jeremy Heiner wrote:
-#! /usr/bin/python2 +# (no '#!' here because configure picks PYTHON)
What is the point of removing this shebang and changing the mode? The only thing that accomplishes is making it impossible to run directly.
The intent was stated in the commit message as "to discourage well-intentioned reversion"... I.e. without this change it is more likely in the future that someone will submit a patch that says "Makefile.am can be made simpler by removing the $(PYTHON) from PY_LOG_COMPILER since pactest.py is executable." Besides, I wager you and me are the only ones who have run pactest directly in the past 6 months. It's just so much more pleasant to let 'make check' run it and format the output nicely.
I'll take that wager!
$ history | grep pactest.py | wc -l 146
Which is to say, there is absolutely no way I will accept removing the shebang from the top. Running pactest.py directly is very important when debugging a failure. ./pactest.py -v -d2 --keep-root -p ... Allan
On Fri, Dec 20, 2013, Allan McRae <allan@archlinux.org> wrote:
Which is to say, there is absolutely no way I will accept removing the shebang from the top. Running pactest.py directly is very important when debugging a failure.
You're right. I overreacted: I doublefacepalmed when I stumbled upon the non-use of $(PYTHON) and went too far in trying to prevent that oversight from ever creeping back into the code. Sorry! I'll write up a replacement patch for this one (and leave the other half of this set to Dave)... Jeremy
On 20/12/13 06:31, Jeremy Heiner wrote:
Instead of the one hard-coded (with '#!') in pactest.py. Remove the '#!', chmod -x, and comment to discourage well-intentioned reversion. Update README. Remove useless '#!' from non-main .py files.
Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com>
Now, I'll actually review this patch...
--- Makefile.am | 2 +- test/pacman/README | 4 ++-- test/pacman/pactest.py | 2 +- test/pacman/pmdb.py | 1 - test/pacman/pmenv.py | 1 - test/pacman/pmfile.py | 1 - test/pacman/pmpkg.py | 1 - test/pacman/pmrule.py | 1 - test/pacman/pmtest.py | 1 - test/pacman/util.py | 1 - 10 files changed, 4 insertions(+), 11 deletions(-) mode change 100755 => 100644 test/pacman/pactest.py
diff --git a/Makefile.am b/Makefile.am index 6396d23..6620fbf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,7 @@ LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ $(top_srcdir)/build-aux/tap-driver.sh PY_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ $(top_srcdir)/build-aux/tap-driver.sh -PY_LOG_COMPILER = $(top_srcdir)/test/pacman/pactest.py +PY_LOG_COMPILER = $(PYTHON) $(top_srcdir)/test/pacman/pactest.py
Good.
AM_PY_LOG_FLAGS = \ --scriptlet-shell $(SCRIPTLET_SHELL) \ --ldconfig $(LDCONFIG) \ diff --git a/test/pacman/README b/test/pacman/README index c7aeb10..f111cd6 100644 --- a/test/pacman/README +++ b/test/pacman/README @@ -55,12 +55,12 @@ Usage pactest will run the suite of test files passed as arguments.
Example: - ./pactest.py tests/*.py + python2.7 pactest.py tests/*.py
This example will run all tests from the "tests" directory.
Use the "help" option to get the full list of parameters: - ./pactest.py --help + python2.7 pactest.py --help
Nope.
The following pieces of software are required to run the pactest suite:
diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py old mode 100755 new mode 100644 index e21cde7..46aa913 --- a/test/pacman/pactest.py +++ b/test/pacman/pactest.py @@ -1,4 +1,4 @@ -#! /usr/bin/python2 +# (no '#!' here because configure picks PYTHON)
Nope.
# # pactest : run automated testing on the pacman binary # diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py index 53de91e..61be95f 100644 --- a/test/pacman/pmdb.py +++ b/test/pacman/pmdb.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 #
Possibly... I do not think there is any reason to run this and all the following directly. Just remove the lone "#" line and OK. Unless someone points out why the shebang is needed here?
# Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmenv.py b/test/pacman/pmenv.py index f358285..e375ba0 100644 --- a/test/pacman/pmenv.py +++ b/test/pacman/pmenv.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Developmet Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmfile.py b/test/pacman/pmfile.py index 49c0274..4d5d210 100644 --- a/test/pacman/pmfile.py +++ b/test/pacman/pmfile.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index 6f7ae6e..5025f38 100644 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py index cfcbb6b..38060eb 100644 --- a/test/pacman/pmrule.py +++ b/test/pacman/pmrule.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py index a1f3645d..b201db4 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> diff --git a/test/pacman/util.py b/test/pacman/util.py index ab5a6f4..f79c4bd 100644 --- a/test/pacman/util.py +++ b/test/pacman/util.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org>
Instead of the one hard-coded (with '#!') in pactest.py. Also remove useless '#!' from non-main .py files. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> --- Makefile.am | 2 +- test/pacman/pmdb.py | 2 -- test/pacman/pmenv.py | 2 -- test/pacman/pmfile.py | 2 -- test/pacman/pmpkg.py | 2 -- test/pacman/pmrule.py | 2 -- test/pacman/pmtest.py | 2 -- test/pacman/util.py | 2 -- 8 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4d5adae..d22c52e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,7 @@ LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ $(top_srcdir)/build-aux/tap-driver.sh PY_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ $(top_srcdir)/build-aux/tap-driver.sh -PY_LOG_COMPILER = $(top_srcdir)/test/pacman/pactest.py +PY_LOG_COMPILER = $(PYTHON) $(top_srcdir)/test/pacman/pactest.py AM_PY_LOG_FLAGS = \ --scriptlet-shell $(SCRIPTLET_SHELL) \ --ldconfig $(LDCONFIG) \ diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py index 53de91e..e64255e 100644 --- a/test/pacman/pmdb.py +++ b/test/pacman/pmdb.py @@ -1,5 +1,3 @@ -#! /usr/bin/python2 -# # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> # diff --git a/test/pacman/pmenv.py b/test/pacman/pmenv.py index f358285..2b021d1 100644 --- a/test/pacman/pmenv.py +++ b/test/pacman/pmenv.py @@ -1,5 +1,3 @@ -#! /usr/bin/python2 -# # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Developmet Team <pacman-dev@archlinux.org> # diff --git a/test/pacman/pmfile.py b/test/pacman/pmfile.py index 49c0274..7109873 100644 --- a/test/pacman/pmfile.py +++ b/test/pacman/pmfile.py @@ -1,5 +1,3 @@ -#! /usr/bin/python2 -# # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> # diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index 6f7ae6e..3daa93f 100644 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -1,5 +1,3 @@ -#! /usr/bin/python2 -# # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> # diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py index cfcbb6b..9c11d5d 100644 --- a/test/pacman/pmrule.py +++ b/test/pacman/pmrule.py @@ -1,5 +1,3 @@ -#! /usr/bin/python2 -# # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> # diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py index a1f3645d..583007f 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py @@ -1,5 +1,3 @@ -#! /usr/bin/python2 -# # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> # diff --git a/test/pacman/util.py b/test/pacman/util.py index ab5a6f4..7947124 100644 --- a/test/pacman/util.py +++ b/test/pacman/util.py @@ -1,5 +1,3 @@ -#! /usr/bin/python2 -# # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org> # -- 1.8.5.2
On 21/12/13 02:59, Jeremy Heiner wrote:
Instead of the one hard-coded (with '#!') in pactest.py. Also remove useless '#!' from non-main .py files.
Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> ---
This is fine. In the future, please make your commit messages stand alone and not require run-on from the subject. A
On Dec 20, 2013, Allan McRae <allan@archlinux.org> wrote:
Unless someone points out why the shebang is needed here?
Easy way to see it's not: those files are all mode 644.
participants (4)
-
Allan McRae
-
Andrew Gregory
-
Dave Reisner
-
Jeremy Heiner