[libconfig-model-dpkg-perl] 01/01: Copyright: warn and fix trailing slashes in Files-Excluded
dod at debian.org
dod at debian.org
Sat Sep 26 17:05:00 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 52ca9e38ed9ba78047ed6cea9f7f9ea7d910c473
Author: Dominique Dumont <dod at debian.org>
Date: Sat Sep 26 19:03:21 2015 +0200
Copyright: warn and fix trailing slashes in Files-Excluded
---
lib/Config/Model/models/Dpkg/Copyright.pl | 8 +++++++-
t/model_tests.d/dpkg-copyright-examples/t7 | 1 +
t/model_tests.d/dpkg-copyright-test-conf.pl | 4 +++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/lib/Config/Model/models/Dpkg/Copyright.pl b/lib/Config/Model/models/Dpkg/Copyright.pl
index 16f885c..e5e67aa 100644
--- a/lib/Config/Model/models/Dpkg/Copyright.pl
+++ b/lib/Config/Model/models/Dpkg/Copyright.pl
@@ -130,7 +130,13 @@ See L<files pattern documentation|https://www.debian.org/doc/packaging-manuals/c
{
'description' => 'White space separated list of file patterns to exclude from the package. This field is only used by L<uscan>. Example: C<*/Makefile.in aclocal.m4>. See also L<UscanEnhancements|https://wiki.debian.org/UscanEnhancements> and the L<files pattern documentation|https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#files-field>.',
'type' => 'leaf',
- 'value_type' => 'string'
+ 'value_type' => 'string',
+ 'warn_if_match' => {
+ '\\/(\\s|$)' => {
+ 'fix' => 's!/(?=\\s|$)!!g;',
+ 'msg' => 'directory entries should not have a trailing slash'
+ }
+ }
},
'Global-License',
{
diff --git a/t/model_tests.d/dpkg-copyright-examples/t7 b/t/model_tests.d/dpkg-copyright-examples/t7
index 236a81f..0f6d472 100644
--- a/t/model_tests.d/dpkg-copyright-examples/t7
+++ b/t/model_tests.d/dpkg-copyright-examples/t7
@@ -1,6 +1,7 @@
Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
Upstream-Name: X Solitaire
Source: ftp://ftp.example.com/pub/games
+Files-Excluded: *.jar 3rdparty/libtommath/ 3rdparty/stuff/
Copyright: Copyright 1998 John Doe <jdoe at example.com>
License: GPL-2+
diff --git a/t/model_tests.d/dpkg-copyright-test-conf.pl b/t/model_tests.d/dpkg-copyright-test-conf.pl
index 8811f8d..020b759 100644
--- a/t/model_tests.d/dpkg-copyright-test-conf.pl
+++ b/t/model_tests.d/dpkg-copyright-test-conf.pl
@@ -95,13 +95,15 @@ $skip = ( $@ or not -r '/etc/debian_version') ? 1 : 0 ;
},
{ # t7
# example from CANDIDATE DEP-5 spec (nb 7)
- load_warnings => [ (qr/Adding/) x 1 , qr/Format does not match/ ],
+ load_warnings => [ (qr/Adding/) x 1 , qr/Format does not match/,
+ qr/trailing slash/],
load_check => 'skip',
apply_fix => 1,
check => {
Format => "https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/",
'Files:"*" Copyright' => 'Copyright 1998 John Doe <jdoe at example.com>',
'Files:"debian/*" License short_name' => 'other',
+ 'Files-Excluded' => '*.jar 3rdparty/libtommath 3rdparty/stuff',
},
},
{
--
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