[libperl5i-perl] 01/01: Add a switch to use installed perl5i libs when running under autopkgtest.

Axel Beckert abe at deuxchevaux.org
Thu May 14 15:14:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository libperl5i-perl.

commit 2ba6fd83aba49b4e3a3f349cedb2852db2f60943
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Thu May 14 17:12:27 2015 +0200

    Add a switch to use installed perl5i libs when running under autopkgtest.
    
    Closes: #785043
---
 debian/changelog                  |  7 ++++++
 debian/patches/dont-use-dash-Ilib | 47 +++++++++++++++++++++++++++++++++++++++
 debian/patches/series             |  1 +
 3 files changed, 55 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9c43c7d..928b37e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libperl5i-perl (2.13.1-2) UNRELEASED; urgency=medium
+
+  * Patch in a switch to use installed perl5i libraries when running under
+    autopkgtest. (Closes: #785043)
+
+ -- Axel Beckert <abe at debian.org>  Thu, 14 May 2015 17:11:08 +0200
+
 libperl5i-perl (2.13.1-1) unstable; urgency=medium
 
   * Team upload
diff --git a/debian/patches/dont-use-dash-Ilib b/debian/patches/dont-use-dash-Ilib
new file mode 100644
index 0000000..4b7b765
--- /dev/null
+++ b/debian/patches/dont-use-dash-Ilib
@@ -0,0 +1,47 @@
+Description: Add switch to use installed perl5i libraries in test suite under autopkgtest
+Author: Axel Beckert <abe at debian.org>
+Bug-Debian: https://bugs.debian.org/785043
+
+Index: libperl5i-perl/t/command_line_wrapper.t
+===================================================================
+--- libperl5i-perl.orig/t/command_line_wrapper.t	2015-05-14 16:57:42.499003413 +0200
++++ libperl5i-perl/t/command_line_wrapper.t	2015-05-14 17:09:22.803559284 +0200
+@@ -10,13 +10,13 @@
+ use Test::More;
+ 
+ my $perl5i;
+-my $script_dir = File::Spec->catdir("blib", "script");
++my $script_dir = File::Spec->catdir(defined($ENV{ADTTMP}) ? ('/usr', 'bin') : ("blib", "script"));
+ for my $wrapper (qw(perl5i perl5i.bat)) {
+     $perl5i = File::Spec->catfile($script_dir, $wrapper);
+     last if -e $perl5i;
+ }
+-my $perl5icmd = qq[$perl5i "-Ilib"];
+-my @perl5icmd = ($perl5i, "-Ilib");
++my $perl5icmd = defined($ENV{ADTTMP}) ? qq[$perl5i] : qq[$perl5i "-Ilib"];
++my @perl5icmd = defined($ENV{ADTTMP}) ? ($perl5i) : ($perl5i, "-Ilib");
+ 
+ ok -e $perl5i, "perl5i command line wrapper was built";
+ 
+@@ -61,7 +61,7 @@
+ 
+ # Check it doesn't have strict vars on
+ is capture {system @perl5icmd, '-e', q($fun="yay"; say $fun;)}, "yay\n", 'no strict vars for perl5i';
+-is capture {system ($^X, '-Ilib', '-Mperl5i::latest', '-e', q|$fun="yay"; say $fun;|)},
++is capture {system ($^X, defined($ENV{ADTTMP}) ? () : ('-Ilib'), '-Mperl5i::latest', '-e', q|$fun="yay"; say $fun;|)},
+     "yay\n", q{no strict vars for perl -Mperl5i::latest -e '...'};
+ 
+ # It acts like Perl when given weird arguments.
+Index: libperl5i-perl/t/perl5i.t
+===================================================================
+--- libperl5i-perl.orig/t/perl5i.t	2014-08-31 01:55:37.511499093 +0200
++++ libperl5i-perl/t/perl5i.t	2015-05-14 17:01:50.566928319 +0200
+@@ -11,7 +11,7 @@
+ like $@, qr/perl5i will break compatibility/;
+ 
+ # but -Mperl5i on the command line means -Mperl5i::latest, and it A-OK
+-is capture {system ($^X, '-Ilib', '-Mperl5i', '-e', q|say 'OK!'|)},
++is capture {system ($^X, defined($ENV{ADTTMP}) ? () : ('-Ilib'), '-Mperl5i', '-e', q|say 'OK!'|)},
+     "OK!\n", q{perl -Mperl5i -e '...' means -Mperl5i::latest};
+ 
+ done_testing();
diff --git a/debian/patches/series b/debian/patches/series
index a97e36d..5cb46b8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 fix-test-for-mips
 cherry-pick-d096ee5e-fix-perl5i-dash-e-from-segfaulting
+dont-use-dash-Ilib

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libperl5i-perl.git



More information about the Pkg-perl-cvs-commits mailing list