]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2002-11-25 14:38:49 by cjwatson]
authorcjwatson <>
Mon, 25 Nov 2002 22:38:50 +0000 (14:38 -0800)
committercjwatson <>
Mon, 25 Nov 2002 22:38:50 +0000 (14:38 -0800)
Point to the list of pseudo-packages rather than packages.debian.org for
pseudo-packages (#85347 and others).

cgi/common.pl
cgi/pkgreport.cgi

index e5090475a94713dd7f23b94ed8758141a9dc80ad..99b965cb0693956ad54f2d805eabf4c7c1c2b419 100644 (file)
@@ -509,6 +509,21 @@ sub getpkgcomponent {
     return $_pkgcomponent;
 }
 
+my $_pseudodesc;
+sub getpseudodesc {
+    return $_pseudodesc if $_pseudodesc;
+    my %pseudodesc;
+
+    open(PSEUDO, "< $gPseudoDescFile") or &quit("open $gPseudoDescFile: $!");
+    while(<PSEUDO>) {
+       next unless m/^(\S+)\s+(\S.*\S)\s*$/;
+       $pseudodesc{lc $1} = $2;
+    }
+    close(PSEUDO);
+    $_pseudodesc = \%pseudodesc;
+    return $_pseudodesc;
+}
+
 sub getbugdir {
     my ( $bugnum, $ext ) = @_;
     my $archdir = sprintf "%02d", $bugnum % 100;
index ddae7cd57d2cfda91c50c32c447021724820cd66..1cf0b8dbbb7dfbd36fd6eb032f9b10efb5bcaeca 100755 (executable)
@@ -206,11 +206,18 @@ if (defined $pkg || defined $src) {
            print ".\n";
        }
        if ($pkg) {
-           printf "<p>You might like to refer to the <a href=\"%s\">%s package page</a>", urlsanit("http://${debbugs::gPackagePages}/$pkg"), htmlsanit("$pkg");
-           if ($pkgsrc{ $pkg }) {
-               printf ", or to the source package <a href=\"%s\">%s</a>'s bug page.</p>\n", srcurl($pkgsrc{$pkg}), htmlsanit($pkgsrc{$pkg});
+           my @references;
+           my $pseudodesc = getpseudodesc();
+           if (defined($pseudodesc) and exists($pseudodesc->{$pkg})) {
+               push @references, "to the <a href=\"http://${debbugs::gWebDomain}/pseudo-packages.html\">list of other pseudo-packages</a>";
            } else {
-               printf ".\n";
+               push @references, sprintf "to the <a href=\"%s\">%s package page</a>", urlsanit("http://${debbugs::gPackagePages}/$pkg"), htmlsanit("$pkg");
+           }
+           if ($pkgsrc{ $pkg }) {
+               push @references, sprintf "to the source package <a href=\"%s\">%s</a>'s bug page", srcurl($pkgsrc{$pkg}), htmlsanit($pkgsrc{$pkg});
+           }
+           if (@references) {
+               print "<p>You might like to refer ", join(", or ", @references), ".</p>\n";
            }
        }
        print "<p>If you find a bug not listed here, please\n";