[libconfig-model-dpkg-perl] 01/02: warn (and fix) if Vcs-Git field is not a recommended URL
dod at debian.org
dod at debian.org
Thu Jan 16 20:18:51 UTC 2014
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 a526f65a25d7d4e72d132b471a9c157b06bdc43f
Author: Dominique Dumont <dod at debian.org>
Date: Thu Jan 16 19:41:07 2014 +0100
warn (and fix) if Vcs-Git field is not a recommended URL
---
lib/Config/Model/models/Dpkg/Control/Source.pl | 8 +++++++-
t/model_tests.d/dpkg-control-test-conf.pl | 9 +++++----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/lib/Config/Model/models/Dpkg/Control/Source.pl b/lib/Config/Model/models/Dpkg/Control/Source.pl
index fceac40..62fbe85 100644
--- a/lib/Config/Model/models/Dpkg/Control/Source.pl
+++ b/lib/Config/Model/models/Dpkg/Control/Source.pl
@@ -254,7 +254,13 @@ The information is meant to be useful for a user knowledgeable in the given Vers
The information is meant to be useful for a user knowledgeable in the given Version Control System and willing to build the current version of a package from the VCS sources. Other uses of this information might include automatic building of the latest VCS version of the given package. To this end the location pointed to by the field should better be version agnostic and point to the main branch (for VCSs supporting such a concept). Also, the location pointed to should be accessible to t [...]
'summary' => 'URL of the VCS repository',
'type' => 'leaf',
- 'value_type' => 'uniline'
+ 'value_type' => 'uniline',
+ 'warn_unless' => {
+ 'debian-uri' => {
+ 'code' => '!defined $_ or ! /debian.org/ or m{^http://anonscm.debian.org/git/(?!git/)} or m{^git://anonscm.debian.org/(?!git/)} ;',
+ 'fix' => 's!http://[\w\.-]+/(git/)*!http://anonscm.debian.org/git/!; s!git://[\w\.-]+/!git://anonscm.debian.org/(git/)*!;'
+ }
+ }
},
'Vcs-Hg',
{
diff --git a/t/model_tests.d/dpkg-control-test-conf.pl b/t/model_tests.d/dpkg-control-test-conf.pl
index 253a2f6..1d4dc07 100644
--- a/t/model_tests.d/dpkg-control-test-conf.pl
+++ b/t/model_tests.d/dpkg-control-test-conf.pl
@@ -110,7 +110,7 @@ providing the following file:
},
{
name => 'libpango-perl',
- load_warnings => [ ( qr/Warning/) x 2 ],
+ load_warnings => [ ( qr/Warning/) x 3 ],
verify_annotation => {
'source Build-Depends' => "do NOT add libgtk2-perl to build-deps (see bug #554704)",
'source Maintainer' => "what a fine\nteam this one is",
@@ -120,19 +120,20 @@ providing the following file:
},
{
name => 'libwx-scintilla-perl',
- load_warnings => [ ( qr/Warning/) x 3 ],
+ load_warnings => [ ( qr/Warning/) x 4 ],
apply_fix => 1,
},
{
# test for #683861
name => 'libmodule-metadata-perl',
- load_warnings => [ ( qr/Warning/) x 3 ],
+ load_warnings => [ ( qr/Warning/) x 4 ],
apply_fix => 1,
},
{
# test for #682730
name => 'libclass-meta-perl',
- check => { 'source Build-Depends-Indep:1' => 'libclass-isa-perl | perl (<< 5.10.1-13)' },
+ load_warnings => [ ( qr/Vcs-Git/) ],
+ check => { 'source Build-Depends-Indep:1' => 'libclass-isa-perl | perl (<< 5.10.1-13)' },
apply_fix => 1,
},
{
--
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