r56131 - in /trunk/libdate-manip-perl/debian: README.source changelog control patches/ patches/fix-Date-__calc_date_delta-cmp-day-beg.patch patches/series rules
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Thu Apr 15 13:55:36 UTC 2010
Author: dmn
Date: Thu Apr 15 13:54:50 2010
New Revision: 56131
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=56131
Log:
add fix-Date-__calc_date_delta-cmp-day-beg.patch
Fixes bad business day calculation is certain cases. Closes: #577950
Medium urgency.
add quilt framework
Added:
trunk/libdate-manip-perl/debian/README.source
trunk/libdate-manip-perl/debian/patches/
trunk/libdate-manip-perl/debian/patches/fix-Date-__calc_date_delta-cmp-day-beg.patch
trunk/libdate-manip-perl/debian/patches/series
Modified:
trunk/libdate-manip-perl/debian/changelog
trunk/libdate-manip-perl/debian/control
trunk/libdate-manip-perl/debian/rules
Added: trunk/libdate-manip-perl/debian/README.source
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdate-manip-perl/debian/README.source?rev=56131&op=file
==============================================================================
--- trunk/libdate-manip-perl/debian/README.source (added)
+++ trunk/libdate-manip-perl/debian/README.source Thu Apr 15 13:54:50 2010
@@ -1,0 +1,5 @@
+This package uses quilt for managing all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+See /usr/share/doc/quilt/README.source for a detailed explaination.
Modified: trunk/libdate-manip-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdate-manip-perl/debian/changelog?rev=56131&op=diff
==============================================================================
--- trunk/libdate-manip-perl/debian/changelog (original)
+++ trunk/libdate-manip-perl/debian/changelog Thu Apr 15 13:54:50 2010
@@ -1,3 +1,12 @@
+libdate-manip-perl (6.07-2) UNRELEASED; urgency=medium
+
+ * add fix-Date-__calc_date_delta-cmp-day-beg.patch
+ Fixes bad business day calculation is certain cases. Closes: #577950
+ Medium urgency.
+ + add quilt framework
+
+ -- Damyan Ivanov <dmn at debian.org> Thu, 15 Apr 2010 16:52:06 +0300
+
libdate-manip-perl (6.07-1) unstable; urgency=low
* New upstream release
Modified: trunk/libdate-manip-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdate-manip-perl/debian/control?rev=56131&op=diff
==============================================================================
--- trunk/libdate-manip-perl/debian/control (original)
+++ trunk/libdate-manip-perl/debian/control Thu Apr 15 13:54:50 2010
@@ -1,9 +1,9 @@
Source: libdate-manip-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7.0.50)
-Build-Depends-Indep: perl (>= 5.10), libtest-pod-perl, libtest-pod-coverage-perl,
- libyaml-syck-perl
+Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7)
+Build-Depends-Indep: libtest-pod-coverage-perl, libtest-pod-perl,
+ libyaml-syck-perl, perl (>= 5.10.0)
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Krzysztof Krzyzaniak (eloy) <eloy at debian.org>,
Damyan Ivanov <dmn at debian.org>, gregor herrmann <gregoa at debian.org>,
@@ -15,7 +15,7 @@
Package: libdate-manip-perl
Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, libyaml-syck-perl, perl (>= 5.10)
+Depends: ${misc:Depends}, ${perl:Depends}, libyaml-syck-perl, perl (>= 5.10.0)
Description: module for manipulating dates
Date::Manip is a Perl module that contains a set of routines designed to make
any common date/time manipulation easy to do. It aims to make operations like
Added: trunk/libdate-manip-perl/debian/patches/fix-Date-__calc_date_delta-cmp-day-beg.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdate-manip-perl/debian/patches/fix-Date-__calc_date_delta-cmp-day-beg.patch?rev=56131&op=file
==============================================================================
--- trunk/libdate-manip-perl/debian/patches/fix-Date-__calc_date_delta-cmp-day-beg.patch (added)
+++ trunk/libdate-manip-perl/debian/patches/fix-Date-__calc_date_delta-cmp-day-beg.patch Thu Apr 15 13:54:50 2010
@@ -1,0 +1,96 @@
+# Description: fix bad comparison in Date::Mainp::Date::__calc_date_delta
+# the check whether we have passed before the working day start seems to have been copied from the check for overflowing the day end and variable names weren't changed.
+# Author: Damyan Ivanov <dmn at debian.org>
+# Bug-Debian: 577950
+# Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=56638
+--- a/lib/Date/Manip/Date.pm
++++ b/lib/Date/Manip/Date.pm
+@@ -2923,8 +2923,8 @@ sub __calc_date_delta {
+ ($h,$mn,$s) = @{ $dmb->calc_time_time([$hbeg,$mbeg,$sbeg],$t2) };
+
+ } elsif ($h < $hbeg ||
+- ($h == $hend && $mn < $mend) ||
+- ($h == $hend && $mn == $mend && $s < $send)) {
++ ($h == $hbeg && $mn < $mbeg) ||
++ ($h == $hbeg && $mn == $mbeg && $s < $sbeg)) {
+
+ # We've gone back past the start of the business day.
+
+--- /dev/null
++++ b/t/date.calc.date_delta_business.2.t
+@@ -0,0 +1,75 @@
++#!/usr/bin/perl -w
++
++require 5.010000;
++
++$runtests=shift(@ARGV);
++if ( -f "t/test.pl" ) {
++ require "t/test.pl";
++ $dir="./lib";
++ $tdir="t";
++} elsif ( -f "test.pl" ) {
++ require "test.pl";
++ $dir="../lib";
++ $tdir=".";
++} else {
++ die "ERROR: cannot find test.pl\n";
++}
++
++unshift(@INC,$dir);
++use Date::Manip::Date;
++
++sub test {
++ (@test)=@_;
++
++ $err = $obj1->parse(shift(@test));
++ return $$obj1{"err"} if ($err);
++ $err = $obj2->parse(shift(@test));
++ return $$obj2{"err"} if ($err);
++
++ my $obj3 = $obj1->calc($obj2, at test);
++ return if (! defined $obj3);
++ $ret = $obj3->value();
++ return $ret;
++}
++
++$obj1 = new Date::Manip::Date;
++$obj1->config("forcedate","now,America/New_York");
++$obj1->config(qw(workdaybeg 09:00:00));
++$obj1->config(qw(workdayend 17:30:00));
++$obj2 = $obj1->new_delta();
++
++$tests="
++
++Wed Nov 20 1996 noon
++business +0:5:0:0
++ 1996112017:00:00
++
++Wed Nov 20 1996 noon
++business +3:7:0:0
++ 1996112610:30:00
++
++Mar 31 1997 16:59:59
++business + 1 sec
++ 1997033117:00:00
++
++Apr 15 2010 17:12:00
++business + 2 days
++ 2010041917:12:00
++
++";
++
++print "calc (date,delta,business 09:00-17:30)...\n";
++test_Func(\&test,$tests,$runtests);
++
++1;
++# Local Variables:
++# mode: cperl
++# indent-tabs-mode: nil
++# cperl-indent-level: 3
++# cperl-continued-statement-offset: 2
++# cperl-continued-brace-offset: 0
++# cperl-brace-offset: 0
++# cperl-brace-imaginary-offset: 0
++# cperl-label-offset: -2
++# End:
++
Added: trunk/libdate-manip-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdate-manip-perl/debian/patches/series?rev=56131&op=file
==============================================================================
--- trunk/libdate-manip-perl/debian/patches/series (added)
+++ trunk/libdate-manip-perl/debian/patches/series Thu Apr 15 13:54:50 2010
@@ -1,0 +1,1 @@
+fix-Date-__calc_date_delta-cmp-day-beg.patch
Modified: trunk/libdate-manip-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdate-manip-perl/debian/rules?rev=56131&op=diff
==============================================================================
--- trunk/libdate-manip-perl/debian/rules (original)
+++ trunk/libdate-manip-perl/debian/rules Thu Apr 15 13:54:50 2010
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
%:
- dh $@
+ dh --with=quilt $@
override_dh_installchangelogs:
dh_installchangelogs HISTORY
More information about the Pkg-perl-cvs-commits
mailing list