[SCM] Git repository for devscripts branch, master, updated. v2.12.0-22-g1dd5680

Benjamin Drung bdrung at debian.org
Thu Aug 2 22:39:41 UTC 2012


The following commit has been merged in the master branch:
commit 1dd5680390ba1474de6c51ff82ac48be69954f62
Author: Benjamin Drung <bdrung at debian.org>
Date:   Fri Aug 3 00:39:23 2012 +0200

    licensecheck: Trim trailing period from some GPL notices' versions.

diff --git a/debian/changelog b/debian/changelog
index 67c321a..6dacaee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ devscripts (2.12.2) UNRELEASED; urgency=low
     - Remove trailing spaces.
     - add --machine option that outputs results in a machine readable format.
       Thanks to Eric Lavarde for the patch. (Closes: #583750)
+    - Trim trailing period from some GPL notices' versions.
 
   [ Richard W.M. Jones ]
   * licensecheck: Check OCaml programs by default (*.ml, *.mli).
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index ec3dc1c..26740e1 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -405,8 +405,8 @@ sub parselicense($) {
     my $extrainfo = "";
     my $license = "";
 
-    if ($licensetext =~ /version ([^, ]+),? (?:\(?only\)?.? )?(?:of the GNU (Affero )?(Lesser |Library )?General Public License )?(as )?published by the Free Software Foundation/i or
-	$licensetext =~ /GNU (?:Affero )?(?:Lesser |Library )?General Public License (?:as )?published by the Free Software Foundation; version ([^, ]+),? /i) {
+    if ($licensetext =~ /version ([^, ]+?)[.,]? (?:\(?only\)?.? )?(?:of the GNU (Affero )?(Lesser |Library )?General Public License )?(as )?published by the Free Software Foundation/i or
+	$licensetext =~ /GNU (?:Affero )?(?:Lesser |Library )?General Public License (?:as )?published by the Free Software Foundation; version ([^, ]+?)[.,]? /i) {
 
 	$gplver = " (v$1)";
     } elsif ($licensetext =~ /GNU (?:Affero )?(?:Lesser |Library )?General Public License, version (\d+(?:\.\d+)?)[ \.]/) {
diff --git a/test/licensecheck/gpl-3.sh b/test/licensecheck/gpl-3.sh
new file mode 100644
index 0000000..17f1932
--- /dev/null
+++ b/test/licensecheck/gpl-3.sh
@@ -0,0 +1,14 @@
+# Copyright (C) 2012 Devscripts developers
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/test/test_licensecheck b/test/test_licensecheck
index fd7ce3f..e7178df 100755
--- a/test/test_licensecheck
+++ b/test/test_licensecheck
@@ -41,6 +41,7 @@ testLGPL() {
 testGPL() {
     license "gpl-2" "GPL (v2)"
     license "gpl-2-comma.sh" "GPL (v2)"
+    license "gpl-3.sh" "GPL (v3)"
 }
 
 testDual() {

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list