[SCM] Debian package checker branch, master, updated. 2.5.11-100-g914cf96
The following commit has been merged in the master branch:
commit 914cf965b87a39c0f2391757757fabca4c7cc369
Author: Niels Thykier <niels@thykier.net>
Date: Sat Jan 26 15:44:33 2013 +0100
L::C::Package: Optimize hardlink "sorting"
First off, skip hardlink sorting if there are no hardlinks. Secondly,
reduce the number of files to check.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index 57cd16d..3a693e6 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -309,11 +309,12 @@ sub _fetch_index_data {
push @{ $children{$parent} }, $name;
}
- @sorted = sort keys %idxh;
- foreach my $file (@sorted) {
- my $e = $idxh{$file};
- if ($rhlinks{$e->{name}}) {
- # There is hard link pointing to this file (or hardlink).
+ if (%rhlinks) {
+ foreach my $file (sort keys %rhlinks) {
+ # We remove entries we have fixed up, so check the entry
+ # is still there.
+ next unless exists $rhlinks{$file};
+ my $e = $idxh{$file};
my %candidates = ();
my @check = ($e->{name});
my @sorted;
@@ -352,6 +353,7 @@ sub _fetch_index_data {
}
}
}
+ @sorted = sort keys %idxh;
foreach my $file (reverse @sorted) {
# Add them in reverse order - entries in a dir are made
# objects before the dir itself.
--
Debian package checker
Reply to: