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

dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.

commit 9986cac6cda3b25f250d2eb559451fff3a906a54
Author: Dominique Dumont <d...@debian.org>
Date:   Tue May 5 20:54:51 2015 +0200

    Scanner: take care of (c) ranges like 2002-3 (Closes: #783928)
---
 lib/Dpkg/Copyright/Scanner.pm | 2 ++
 t/scanner/pack_copyright.t    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index e9d492b..e0c7965 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -186,6 +186,8 @@ sub __pack_copyright ($r) {
         my $data = $cop{$owner};
         foreach my $year ($data->@*) {
             return $r if $year =~ /[^\d-]/; # bail-out
+            # take care of ranges written like 2002-3
+            $year =~ s/^(\d\d\d)(\d)-(\d)$/$1$2-$1$3/;
             # take care of ranges written like 2014-15
             $year =~ s/^(\d\d)(\d\d)-(\d\d)$/$1$2-$1$3/;
             eval {
diff --git a/t/scanner/pack_copyright.t b/t/scanner/pack_copyright.t
index 3eb0853..170b7ea 100644
--- a/t/scanner/pack_copyright.t
+++ b/t/scanner/pack_copyright.t
@@ -19,7 +19,7 @@ my @tests = (
         "2011, Heinrich Muller <henmull\@src.gnome.org>\n 2002-2006, Charles 
Kerr <charles\@rebelbase.com>"
     ],
     [
-        '2002-2006 Charles Kerr <char...@rebelbase.com> / 2002, 2003, 2004, 
2005, 2007, 2008, 2010 Free Software / 2011 Heinrich Muller 
<henm...@src.gnome.org> / 2002 vjt (irssi project)',
+        '2002-6 Charles Kerr <char...@rebelbase.com> / 2002, 2003, 2004, 2005, 
2007, 2008, 2010 Free Software / 2011 Heinrich Muller <henm...@src.gnome.org> / 
2002 vjt (irssi project)',
         "2011, Heinrich Muller <henmull\@src.gnome.org>\n 2002-2006, Charles 
Kerr <charles\@rebelbase.com>\n 2002-2005, 2007, 2008, 2010, Free Software\n 
2002, vjt (irssi project)"
     ],
     [

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

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to