From: Frank Lichtenheld Date: Mon, 20 Feb 2006 15:31:00 +0000 (+0000) Subject: print_deps: If a virtual package is only provided by a few packages, X-Git-Tag: switch-to-templates~99 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=24ffc8c7b59a3323dcfae1ec99685c6b672ae28a;p=deb%2Fpackages.git print_deps: If a virtual package is only provided by a few packages, show a list of these directly --- diff --git a/lib/Packages/HTML.pm b/lib/Packages/HTML.pm index 84bc989..a3b159b 100644 --- a/lib/Packages/HTML.pm +++ b/lib/Packages/HTML.pm @@ -297,7 +297,13 @@ sub print_deps { push @res_pkgs, dep_item( "$ROOT/$path/$p_name", $p_name, "$pkg_version$arch_str" ); } elsif ($arch eq 'virtual') { - $short_desc = "virtual package"; + my @provided_by = split /\s/, $short_desc; + $short_desc = "virtual package provided by "; + if (@provided_by < 10) { + $short_desc .= join( ', ',map { "$_" } @provided_by); + } else { + $short_desc .= scalar(@provided_by)." packages"; + } push @res_pkgs, dep_item( "$ROOT/$path/$p_name", $p_name, "$pkg_version$arch_str", $short_desc ); } else {