summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rw-r--r--lib/Lintian/Collect/Package.pm6
2 files changed, 7 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 3c9bc13..86ea262 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -183,6 +183,9 @@ lintian (2.5.12) UNRELEASED; urgency=low
+ [NT] Recognise packages in section "metapackages" as a
metapackage. Thanks to Axel Beckert for the report.
(Closes: #698610)
+ * lib/Lintian/Collect/Package.pm:
+ + [NT] Ensure the "root" entry of indices do not contain itself.
+ (Closes: #695866)
* lib/Lintian/Command/Simple.pm:
+ [NT] Use constant time lookup access instead of linear scan with
"hashref" wait.
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index 3a693e6..d8c7af5 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -306,8 +306,10 @@ sub _fetch_index_data {
$file{dirname} = $parent;
$file{basename} = $base;
$children{$parent} = [] unless exists $children{$parent};
- push @{ $children{$parent} }, $name;
-
+ # Ensure the "root" is not its own child. It is not really helpful
+ # from an analysis PoV and it creates ref cycles (and by extension
+ # leaks like #695866).
+ push @{ $children{$parent} }, $name unless $parent eq $name;
}
if (%rhlinks) {
foreach my $file (sort keys %rhlinks) {