[SCM] Debian package checker branch, master, updated. 2.5.2-16-g2860a9b
The following commit has been merged in the master branch:
commit 2860a9b028dcdc137d49d634cc3c20d1aa30b503
Author: Niels Thykier <niels@thykier.net>
Date: Sun Aug 14 15:27:16 2011 +0200
Use croak instead of fail in Lintian::Collect::Package
diff --git a/debian/changelog b/debian/changelog
index 9a5b605..193238e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,8 @@ lintian (2.5.3) UNRELEASED; urgency=low
LANG.
* lib/Lintian/Collect/Source.pm:
+ [NT] Removed a requirement for fields that was not needed.
+ * lib/Lintian/Collect/Package.pm:
+ + [JW,NT] Replace use of fail with croak. (Closes: #637741)
* lib/Lintian/Profile.pm:
+ [NT] Reject profiles containing an unknown field.
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index 93f8095..c535450 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -43,12 +43,12 @@ sub file_info {
my %file_info;
# sub file_info Needs-Info file-info
open(my $idx, '<', "$base_dir/file-info")
- or fail("cannot open $base_dir/file-info: $!");
+ or croak "cannot open $base_dir/file-info: $!";
while (<$idx>) {
chomp;
m/^(.+?)\x00\s+(.*)$/o
- or fail("an error in the file pkg is preventing lintian from checking this package: $_");
+ or croak "an error in the file pkg is preventing lintian from checking this package: $_";
my ($file, $info) = ($1,$2);
$file =~ s,^\./,,o;
@@ -114,10 +114,10 @@ sub _fetch_index_data {
my (%idxh, %dir_counts);
my $num_idx;
open my $idx, '<', "$base_dir/$index"
- or fail("cannot open index file $base_dir/$index: $!");
+ or croak "cannot open index file $base_dir/$index: $!";
if ($indexown) {
open $num_idx, '<', "$base_dir/$indexown"
- or fail("cannot open index file $base_dir/$indexown: $!");
+ or croak "cannot open index file $base_dir/$indexown: $!";
}
while (<$idx>) {
chomp;
@@ -132,9 +132,9 @@ sub _fetch_index_data {
# If we have a "numeric owner" index file, read that as well
my $numeric = <$num_idx>;
chomp $numeric;
- fail('cannot read index file $indexown') unless defined $numeric;
+ croak 'cannot read index file $indexown' unless defined $numeric;
my ($owner_id, $name_chk) = (split(' ', $numeric, 6))[1, 5];
- fail("mismatching contents of index files: $name $name_chk")
+ croak "mismatching contents of index files: $name $name_chk"
if $name ne $name_chk;
($file{uid}, $file{gid}) = split '/', $owner_id, 2;
}
--
Debian package checker
Reply to: