+
+ my $html = my $txt = "";
+ my $id = " id='$p{name}'";
+ if ($p{versions}) {
+ warn "\tversions=$p{versions}\n" if DEBUG;
+
+ $html .= "\n<dt><a href='$p{name}'$id>$p{name}</a> ($p{versions})";
+ $id = "";
+ $html .= " [<strong class='pmarker'>$p{section}</strong>]"
+ if $p{section} ne 'main';
+ $html .= " [<strong class='pmarker'>$p{archive}</strong>]"
+ if $p{archive} ne 'us';
+ $html .= "</dt>\n<dd";
+
+ $txt .= "\n$p{name} ($p{versions})";
+ $txt .= " [$p{section}]" if $p{section} ne 'main';
+ $txt .= " [$p{archive}]" if $p{archive} ne 'us';
+ $txt .= " ";
+
+ if ($p{trans_desc}) {
+ foreach my $lang (@LANGUAGES) {
+ my ($sdesc, $sdesc_html, $desclang) = ($p{desc},
+ encode_entities($p{desc}, '<>&"\''),
+ 'en');
+ if ($p{trans_desc}{$lang}) {
+ $sdesc = $p{trans_desc}{$lang};
+ $sdesc_html = encode_entities($sdesc, '<>&"\'');
+ $desclang = $lang;
+ }
+
+ $html .= $s{begin}{$lang};
+ $html .= " lang='$desclang'" if $desclang ne $lang;
+ $html .= ">$sdesc_html$s{end}{$lang}";
+ }
+ } else {
+ $html .= " lang='en'>".encode_entities($p{desc}, '<>&"\'');
+ }
+ $html .= "</dd>";
+ $txt .= $p{desc};
+ }
+
+ if (@{$p{providers}}) {
+ warn "\tproviders=@{$p{providers}}\n" if DEBUG;
+ $html .= "\n<dt><a href='$p{name}'$id>$p{name}</a></dt><dd>$prov_string ";
+ my @prov;
+ foreach my $prov (@{$p{providers}}) {
+ my $prov_uri = uri_escape($prov);
+ push @prov, "<a href='../$prov_uri'>$prov</a>";
+ }
+ $html .= join(', ', @prov)."</dd>";
+ $txt .= "\n$p{name} virtual package provided by ".
+ join(', ', @{$p{providers}});
+ }
+ warn "HTML=$html\n" if DEBUG > 1;
+ warn "TXT=$txt\n" if DEBUG > 1;
+
+ print {$fh{$suite}} $html;
+ $fh{"$suite/en/txt"}->gzwrite($txt);
+ foreach my $key (qw(section subsection priority)) {
+ next unless $fh{"$suite/$p{$key}"};
+ warn "\t\t$suite/$p{$key}\n" if DEBUG;
+ print {$fh{"$suite/$p{$key}"}} $html;
+ }