[libtime-format-perl] 02/06: Add patch to fix test failures.
gregor herrmann
gregoa at debian.org
Fri May 1 14:27:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libtime-format-perl.
commit 7248f4e4a7db4073644a4a8f7dcf2aaef3e7d366
Author: gregor herrmann <gregoa at debian.org>
Date: Fri May 1 16:18:08 2015 +0200
Add patch to fix test failures.
Taken from CPAN RT#99572.
---
debian/patches/fix-cleaning-date-manip.patch | 69 ++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 70 insertions(+)
diff --git a/debian/patches/fix-cleaning-date-manip.patch b/debian/patches/fix-cleaning-date-manip.patch
new file mode 100644
index 0000000..1a3ff56
--- /dev/null
+++ b/debian/patches/fix-cleaning-date-manip.patch
@@ -0,0 +1,69 @@
+Description: clean %INC and the symbol table only if Date::Manip is not loaded successfully
+Origin: CPAN RT
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=99572
+Author: Olaf <japhno [...] gmail.com>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2015-05-01
+
+--- a/t/doc.t
++++ b/t/doc.t
+@@ -14,13 +14,17 @@
+ BEGIN
+ {
+ $dm_notok = eval('use Date::Manip (); 1')? 0 : 1;
+- unless ($dm_notok)
++ if ($dm_notok)
++ {
++ # Clean up %INC and symbol table
++ delete $INC{'Date/Manip.pm'};
++ %Date::Manip:: = ();
++ }
++ else
+ {
+ # If Date::Manip can't determine the time zone, it'll bomb out of the tests.
+ $dm_notz = eval('Date::Manip::Date_TimeZone (); 1')? 0 : 1;
+ }
+- delete $INC{'Date/Manip.pm'};
+- %Date::Manip:: = ();
+ }
+
+ # Were all variables imported? (3)
+--- a/t/funcs.t
++++ b/t/funcs.t
+@@ -17,13 +17,17 @@
+ my $manip_notz;
+ BEGIN {
+ $manip_bad = eval('use Date::Manip (); 1')? 0 : 1;
+- unless ($manip_bad)
++ if ($manip_bad)
++ {
++ # Clean up %INC and symbol table
++ delete $INC{'Date/Manip.pm'};
++ %Date::Manip:: = ();
++ }
++ else
+ {
+ # If Date::Manip can't determine the time zone, it'll bomb out of the tests.
+ $manip_notz = eval ('Date::Manip::Date_TimeZone (); 1')? 0 : 1;
+ }
+- delete $INC{'Date/Manip.pm'};
+- %Date::Manip:: = ();
+ }
+
+ # Get day/month names in current locale
+--- a/t/manip.t
++++ b/t/manip.t
+@@ -18,8 +18,11 @@
+ $manip_bad = 'Date::Manip cannot determine time zone'
+ unless eval 'Date::Manip::Date_TimeZone(); 1';
+ }
+- delete $INC{'Date/Manip.pm'};
+- %Date::Manip:: = ();
++ if ($manip_bad) {
++ # Clean up %INC and symbol table
++ delete $INC{'Date/Manip.pm'};
++ %Date::Manip:: = ();
++ }
+ }
+
+ my $t = 'first thursday in june 2003';
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7c86e61
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-cleaning-date-manip.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libtime-format-perl.git
More information about the Pkg-perl-cvs-commits
mailing list