]> git.deb.at Git - deb/packages.git/commitdiff
print_deps: If a virtual package is only provided by a few packages,
authorFrank Lichtenheld <frank@lichtenheld.de>
Mon, 20 Feb 2006 15:31:00 +0000 (15:31 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Mon, 20 Feb 2006 15:31:00 +0000 (15:31 +0000)
show a list of these directly

lib/Packages/HTML.pm

index 84bc989c2199f95928f74be60120a4e352ce099c..a3b159b556a0e1a5977a186e44f8d6c736adc237 100644 (file)
@@ -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 { "<a href=\"$ROOT/$path/$_\">$_</a>" } @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 {