[SCM] Debian package checker branch, master, updated. 2.2.2-39-g601fbd1
The following commit has been merged in the master branch:
commit 71eda13dff444ddf6d48b4f7d68fc83b06e5e2a0
Author: Raphael Geissert <atomo64@gmail.com>
Date: Sat Feb 7 14:24:17 2009 -0600
Add support to extract information from file-info via Lintian::Data::Source
diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm
index 32c9e81..f71da46 100644
--- a/lib/Lintian/Collect/Source.pm
+++ b/lib/Lintian/Collect/Source.pm
@@ -140,6 +140,26 @@ sub binary_relation {
return $self->{binary_relation}->{$field};
}
+# Returns the information from collect/file-info.
+sub file_info {
+ my ($self) = @_;
+ return $self->{file_info} if exists $self->{file_info};
+
+ my %file_info;
+ open(my $idx, '<', "file-info") or fail("cannot open file-info: $!");
+ while (<$idx>) {
+ chomp;
+ m/^(.+?):\s+(.*)$/o or fail("cannot parse file output: $_");
+ my ($file, $info) = ($1,$2);
+ $file =~ s,^\./,,o;
+ $file =~ s,/+$,,o;
+ $file_info{$file} = $info;
+ }
+ close $idx;
+ $self->{file_info} = \%file_info;
+ return $self->{file_info};
+}
+
# Return a Lintian::Relation object for the given build relationship
# field. In addition to all the normal build relationship fields, the
# following special field names are supported: build-depends-all
--
Debian package checker
Reply to: