[libconfig-model-dpkg-perl] 02/36: C::M::D::Copyright: warn and fix MIT license to Expat (Closes: #797321)
dod at debian.org
dod at debian.org
Sat Oct 17 16:27:09 UTC 2015
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 a8de46791c32102789a72367175bfcc625342503
Author: Dominique Dumont <dod at debian.org>
Date: Mon Sep 28 13:41:31 2015 +0200
C::M::D::Copyright: warn and fix MIT license to Expat (Closes: #797321)
---
lib/Config/Model/models/Dpkg.pl | 2 +-
lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/Config/Model/models/Dpkg.pl b/lib/Config/Model/models/Dpkg.pl
index 826c0f8..4e71bf9 100644
--- a/lib/Config/Model/models/Dpkg.pl
+++ b/lib/Config/Model/models/Dpkg.pl
@@ -5,7 +5,7 @@
],
'class_description' => 'Model of Debian source package files (e.g debian/control, debian/copyright...)',
'copyright' => [
- '2010-2015 Dominique Dumont',
+ '2010-2015 Dominique Dumont'
],
'element' => [
'my_config',
diff --git a/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl b/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl
index a57ae1a..0217641 100644
--- a/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl
+++ b/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl
@@ -93,6 +93,16 @@ license: abbrev exception(?)
},
'type' => 'leaf',
'value_type' => 'uniline',
+ 'warn_if_match' => {
+ '\\bMIT\\b' => {
+ 'fix' => '# need to test if target exists before moving element
+my $lic = $self->grab(\'- - - License\');
+$lic->move($_,\'Expat\') unless $lic->defined(\'Expat\');
+$_ = \'Expat\';
+',
+ 'msg' => 'There are many versions of the MIT license. Please use Expat instead, when it matches. See L<Debian copyright format|https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#license-specification> for details.'
+ }
+ },
'warp' => {
'rules' => [
'&location !~ /Global/',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git
More information about the Pkg-perl-cvs-commits
mailing list