[license-reconcile] 01/01: Added tweak to Copyright text when list of years is not Set::IntSpan compatible

Nicholas Bamber periapt at moszumanska.debian.org
Tue Nov 17 11:54:55 UTC 2015


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

periapt pushed a commit to branch master
in repository license-reconcile.

commit a16d27c86d356fca98f1544037fb8e31cc171cab
Author: Nicholas Bamber <nicholas at periapt.co.uk>
Date:   Tue Nov 17 11:55:02 2015 +0000

    Added tweak to Copyright text when list of years is not Set::IntSpan compatible
---
 debian/changelog                              | 2 ++
 lib/Debian/LicenseReconcile/CopyrightDatum.pm | 3 +++
 lib/Debian/LicenseReconcile/LicenseCheck.pm   | 5 +++--
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index db9c673..4f81eb2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ license-reconcile (0.9) UNRELEASED; urgency=medium
   * Added bash completion file
   * Added support for Artistic-2.0, GPL-3 and GPL-3+ and others
   * Added --suggest-stanzas option
+  * Added tweak to Copyright text when list of years is
+    not Set::IntSpan compatible
 
  -- Nicholas Bamber <nicholas at periapt.co.uk>  Sat, 07 Nov 2015 23:55:16 +0000
 
diff --git a/lib/Debian/LicenseReconcile/CopyrightDatum.pm b/lib/Debian/LicenseReconcile/CopyrightDatum.pm
index 9ce5ee0..51b80fd 100644
--- a/lib/Debian/LicenseReconcile/CopyrightDatum.pm
+++ b/lib/Debian/LicenseReconcile/CopyrightDatum.pm
@@ -66,6 +66,9 @@ sub _parse {
     my $text = shift;
     foreach my $line (split $NL_RE, $text) {
         next if not $line;
+
+        $line =~ s!,\s+(\d{4})\s+(\d{4}),\s+!, $1, $2, !g;
+
         my $match = ($line =~ $LINE_RE);
         ### assert: $match
         my $set_intspan = $1;
diff --git a/lib/Debian/LicenseReconcile/LicenseCheck.pm b/lib/Debian/LicenseReconcile/LicenseCheck.pm
index 21512ec..f1efcd3 100644
--- a/lib/Debian/LicenseReconcile/LicenseCheck.pm
+++ b/lib/Debian/LicenseReconcile/LicenseCheck.pm
@@ -29,8 +29,9 @@ Readonly my %LICENSE_MAPPING => (
     'GPL-2' => 'GPL-2',
     'GPL (v1)' => 'GPL-1',
     'GPL (v1 or later)' => 'GPL-1+',
+    'LGPL (v2.1 or later)' => 'LGPL-2.1+',
     'LGPL (v2.1)' => 'LGPL-2.1',
-    'LGPL (v2.1 or v3) => 'LGPL-2.1 or LGPL-3',
+    'LGPL (v2.1 or v3)' => 'LGPL-2.1 or LGPL-3',
     'LGPL (v2 or v3)' => 'LGPL-2 or LGPL-3',
     'LGPL (v3 or later)' => 'LGPL-3+',
     'MPL (v2.0)' => 'MPL-2.0',
@@ -39,7 +40,7 @@ Readonly my %LICENSE_MAPPING => (
     'GPL (v2 or later)' => 'GPL-2+',
     'GPL (v3)' => 'GPL-3',
     'GPL (v3 or later)' => 'GPL-3+',
-    'LGPL (v2)' => 'LGPL',
+    'LGPL (v2)' => 'LGPL-2',
     'zlib/libpng' => 'zlib/libpng',
     'BSD (4 clause)' => 'BSD-4-clause',
     'BSD (2 clause)' => 'BSD-2-clause',

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



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