[lintian] 01/09: Move dep5 checking to it own subroutine
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit 8daacbc89cd00d45f0c64415a9e8ea371c417c69
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Mon Jul 14 22:39:07 2014 +0200
Move dep5 checking to it own subroutine
Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
checks/source-copyright.pm | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm
index 05b901f..1e8726f 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -41,6 +41,7 @@ my %dep5_renamed_fields = (
'name' => 'upstream-name',
);
+
sub run {
my (undef, undef, $info) = @_;
my $copyright_filename = $info->debfiles('copyright');
@@ -182,7 +183,20 @@ sub run {
}
if (@dep5) {
- my $first_para = shift @dep5;
+ _parse_dep5($info,\@dep5,\@lines);
+ }else {
+ tag 'no-dep5-copyright';
+ }
+
+ return;
+}
+
+
+sub _parse_dep5 {
+ my ($info,$dep5ref,$linesref) = @_;
+ my @dep5 = @$dep5ref;
+ my @lines = @$linesref;
+ my $first_para = shift @dep5;
my %standalone_licenses;
my %required_standalone_licenses;
for my $field (keys %{$first_para}) {
@@ -274,11 +288,6 @@ sub run {
"(paragraph at line $lines[$i]{'START-OF-PARAGRAPH'})";
}
}
- }else {
- tag 'no-dep5-copyright';
- }
-
- return;
}
sub split_licenses {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: