[devscripts] 01/01: licensecheck:

Nicholas Bamber periapt at moszumanska.debian.org
Sat Nov 28 08:27:20 UTC 2015


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

periapt pushed a commit to branch master
in repository devscripts.

commit 30c25e68f57bbcf990532737216a78bbbedce31b
Author: Nicholas Bamber <nicholas at periapt.co.uk>
Date:   Sat Nov 28 08:26:41 2015 +0000

    licensecheck:
    
    * licensecheck:
      - Tweaked parselicense to capture 'and or' as well as
        'and/or' in GPL licenses (Closes: #559429)
---
 debian/changelog             |  3 +++
 scripts/licensecheck.pl      |  6 +++---
 test/licensecheck/bug-559429 | 10 ++++++++++
 test/test_licensecheck       |  1 +
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 61cbcb0..b0af2b9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,9 @@ devscripts (2.15.10) UNRELEASED; urgency=medium
     - Added --soap-timeout option to bts
     - Added listcachedbugs command to bts
     - Split out bts bash completion handling into its own script
+  * licensecheck:
+    - Tweaked parselicense to capture 'and or' as well as
+      'and/or' in GPL licenses (Closes: #559429)
 
   [ Dominique Dumont ]
   * licensecheck:
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index 5f81286..e84a171 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -544,15 +544,15 @@ sub parselicense {
 	$license = "GENERATED FILE";
     }
 
-    if ($licensetext =~ /(are made available|(is free software.? )?you can redistribute (it|them) and\/or modify (it|them)|is licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesser )General Public License|LGPL)/i) {
+    if ($licensetext =~ /(are made available|(is free software.? )?you can redistribute (it|them) and(?:\/|\s+)or modify (it|them)|is licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesser )General Public License|LGPL)/i) {
 	$license = "LGPL$gplver$extrainfo $license";
     }
 
-    if ($licensetext =~ /is free software.? you can redistribute (it|them) and\/or modify (it|them) under the terms of the (GNU Affero General Public License|AGPL)/i) {
+    if ($licensetext =~ /is free software.? you can redistribute (it|them) and(?:\/|\s+)or modify (it|them) under the terms of the (GNU Affero General Public License|AGPL)/i) {
 	$license = "AGPL$gplver$extrainfo $license";
     }
 
-    if ($licensetext =~ /(is free software.? )?you (can|may) redistribute (it|them) and\/or modify (it|them) under the terms of (?:version [^ ]+ (?:\(?only\)? )?of )?the GNU General Public License/i) {
+    if ($licensetext =~ /(is free software.? )?you (can|may) redistribute (it|them) and(?:\/|\s+)or modify (it|them) under the terms of (?:version [^ ]+ (?:\(?only\)? )?of )?the GNU General Public License/i) {
 	$license = "GPL$gplver$extrainfo $license";
     }
 
diff --git a/test/licensecheck/bug-559429 b/test/licensecheck/bug-559429
new file mode 100644
index 0000000..0ba7580
--- /dev/null
+++ b/test/licensecheck/bug-559429
@@ -0,0 +1,10 @@
+#    Copyright (c) 2012 Devscripts developers
+#
+#    This program is free software; you can redistribute it and or
+#    modify it under the terms of version 2 of the GNU General Public
+#    License as published by the Free Software Foundation.
+#
+#    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.
diff --git a/test/test_licensecheck b/test/test_licensecheck
index 977baa4..86a6420 100755
--- a/test/test_licensecheck
+++ b/test/test_licensecheck
@@ -85,6 +85,7 @@ testLGPL() {
 testGPL() {
     license "gpl-1" "GPL (v1 or later)"
     license "gpl-2" "GPL (v2)"
+    license "bug-559429" "GPL (v2)"
     license "gpl-2+" "GPL (v2 or later)"
     license "gpl-2+.scm" "GPL (v2 or later)"
     license "gpl-2-comma.sh" "GPL (v2)"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list