$pkgs++;
my $key = $pkg;
if ( $src =~ /Security/ ) {
- $det .= "<b>$pkg (s) </b>";
- $key = "<b>$pkg</b>";
+ $det .= "<b>$pkg (s)</b> ";
$sechosts{$H}=1;
$secpkgs{$pkg}=1;
$secs++;
$sectot++;
} elsif ( $src =~ /Indexdata/ ) {
$det .= "<i><b>$pkg</b> (id) </i>";
- $key = "<i>$pkg</i>";
$ownhosts{$H}=1;
$ownpkgs{$pkg}=1;
$own++;
$owntot++;
} else {
- $det .= "$pkg";
+ $det .= "$pkg ";
$normhosts{$H}=1;
$normpkgs{$pkg}=1;
$normtot++;
if ( !$summary{$key} ) {
$summary{$key} = "";
}
+ $summary{$key} .= "$H ";
$new = strdiff($cur,$new);
$cur = strdiff($new,$cur);
- $summary{$key} .= "$H ";
$det .= "</td> ";
$det .= "<td>$cur</td> ";
$det .= "<td>$new</td> ";
print F "<H1>Apt package status</H1>\n";
-# Summary table - NEW: one row for per host group
+# Summary table: one row for per host group
print F "<p/>\n";
print F "<table border='1' >\n";
print F "<tr><td> </td>" ;
for $HH ( sort(keys(%sechosts)) ) {
print F "<a href='#$HH'><b>$HH</b></a> ";
}
- print F "<td>" . join(" ",sort(keys(%secpkgs))) . " </td>";
+ print F "</td>";
+ print F "<td>";
+ for $PP ( sort(keys(%secpkgs)) ) {
+ print F "<a href='#$PP'>$PP</a> ";
+ }
+ print F "</td>";
print F "</tr>\n";
}
if ( $owntot ) {
for $HH ( sort(keys(%ownhosts)) ) {
print F "<a href='#$HH'><b>$HH</b></a> ";
}
- print F "<td>" . join(" ",sort(keys(%ownpkgs))) . " </td>";
+ print F "</td>";
+ print F "<td>";
+ for $PP ( sort(keys(%ownpkgs)) ) {
+ print F "<a href='#$PP'>$PP</a> ";
+ }
+ print F "</td>";
+ #print F "<td>" . join(" ",sort(keys(%ownpkgs))) . " </td>";
print F "</tr>\n";
}
if ( $normtot ) {
# The host table
print F $table;
+# Package table
+print F "<p/><b><u>Packages</u></b>\n";
+print F "<table>\n";
+for $P ( sort(keys(%summary)) ) {
+ my $PN = $P;
+ $PN = "<b>$P (s)</b>" if ($secpkgs{$P});
+ $PN = "$P (id)" if ($ownpkgs{$P});
+ print F "<tr><td><a name='$P'/>$PN</td>\n";
+ print F "<td>";
+ for $HH ( split(' ',$summary{$P} )) {
+ print F "<a href=#$HH>$HH</a> ";
+ }
+ print F "</td>\n";
+
+}
+print F "</table>\n";
+
print F "<p/>Produced " . `date`.
" on " . `hostname` . " by " . `whoami` .
"<br/>\n";