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 88250bc2774fb45f49da9efec2dfee0a954a7f45 Author: Dominique Dumont <d...@debian.org> Date: Tue Jun 7 13:46:30 2016 +0200 Check/fix Debian BTS url in patch header --- lib/Config/Model/models/Dpkg/Patch.pl | 18 +++++++++++++++++- t/model_tests.d/dpkg-patch-test-conf.pl | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/Config/Model/models/Dpkg/Patch.pl b/lib/Config/Model/models/Dpkg/Patch.pl index 7b02b15..06d19fc 100644 --- a/lib/Config/Model/models/Dpkg/Patch.pl +++ b/lib/Config/Model/models/Dpkg/Patch.pl @@ -66,7 +66,23 @@ you can fill like the C<Bug> field.', { 'cargo' => { 'type' => 'leaf', - 'value_type' => 'uniline' + 'value_type' => 'uniline', + 'warn_if_match' => { + 'https://bugs.debian.org/cgi-bin/bugreport\\.cgi\\?bug=' => { + 'fix' => 's!/cgi-bin/bugreport\\.cgi\\?bug=!/!', + 'msg' => 'You should use the simplified form of BTS URL' + } + }, + 'warn_unless_match' => { + '^https' => { + 'fix' => 's!^http://!https://!', + 'msg' => 'https protocol should be used instead of http' + }, + '^https?://bugs\\.debian\\.org/' => { + 'fix' => 's!https?://[^/]*!https://bugs.debian.org/!', + 'msg' => 'Unknown host or protocol for Debian BTS' + } + } }, 'description' => 'This field contains one URL pointing to the related bug (possibly fixed by the patch). The Bug-Debian field is reserved for the bug URL in Debian BTS. Those fields can be used multiple times if several bugs are concerned.', 'summary' => 'URL for related bug in Debian BTS', diff --git a/t/model_tests.d/dpkg-patch-test-conf.pl b/t/model_tests.d/dpkg-patch-test-conf.pl index 1104f09..6c3c46c 100644 --- a/t/model_tests.d/dpkg-patch-test-conf.pl +++ b/t/model_tests.d/dpkg-patch-test-conf.pl @@ -14,6 +14,7 @@ $skip = ( $@ or not -r '/etc/debian_version' ) ? 1 : 0; { name => 'libperl5i' , config_file => $conf_file_name, + load_warnings => [ qr/https protocol should/ ], apply_fix => 1 , check => { 'Synopsis' => qr/test TODO/, @@ -23,7 +24,7 @@ $skip = ( $@ or not -r '/etc/debian_version' ) ? 1 : 0; 'Bug:0' => 'https://github.com/schwern/perl5i/issues/218', 'Bug:1' => 'https://github.com/schwern/perl5i/issues/219', 'Origin' => 'https://github.com/doherty/perl5i', - 'Bug-Debian:0' => 'http://bugs.debian.org/655329', + 'Bug-Debian:0' => 'https://bugs.debian.org/655329', }, # file_check_sub => $del_home, -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits