From 24ffc8c7b59a3323dcfae1ec99685c6b672ae28a Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Mon, 20 Feb 2006 15:31:00 +0000 Subject: [PATCH] print_deps: If a virtual package is only provided by a few packages, show a list of these directly --- lib/Packages/HTML.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 { -- 2.39.2