From fe3cb56ad04bdfdd05bb7066514228657180105c Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 24 Sep 2008 20:19:11 -0700 Subject: [PATCH] * Fix link to pseudopackages * Add back link to reporting instructions * Fix source entry for psuedopackages on bugreport_pkginfo.tmpl --- Debbugs/CGI/Pkgreport.pm | 17 +++++++++-------- cgi/bugreport.cgi | 2 +- templates/en_US/cgi/bugreport_pkginfo.tmpl | 6 ++++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm index 085b31e..beba95a 100644 --- a/Debbugs/CGI/Pkgreport.pm +++ b/Debbugs/CGI/Pkgreport.pm @@ -129,17 +129,18 @@ sub generate_package_info{ my @references; my $pseudodesc = getpseudodesc(); if ($package and defined($pseudodesc) and exists($pseudodesc->{$package})) { - push @references, "to the ". + push @references, "to the ". "list of other pseudo-packages"; } else { - if ($package and defined $gPackagePages) { + if ($package and defined $config{package_pages} and length $config{package_pages}) { push @references, sprintf "to the %s package page", - html_escape("http://${gPackagePages}/$package"), html_escape("$package"); + html_escape("http://$config{package_pages}/$package"), html_escape("$package"); } - if (defined $gSubscriptionDomain) { + if (defined $config{subscription_domain} and + length $config{subscription_domain}) { my $ptslink = $param{binary} ? $srcforpkg : $package; - push @references, q(to the Package Tracking System); + push @references, q(to the Package Tracking System); } # Only output this if the source listing is non-trivial. if ($param{binary} and $srcforpkg) { @@ -154,12 +155,12 @@ sub generate_package_info{ $references[$#references] = "or $references[$#references]" if @references > 1; print {$output} "

You might like to refer ", join(", ", @references), ".

\n"; } - if (defined $param{maint} || defined $param{maintenc}) { + if (defined $maint) { print {$output} "

If you find a bug not listed here, please\n"; printf {$output} "report it.

\n", - html_escape("http://${debbugs::gWebDomain}/Reporting${debbugs::gHTMLSuffix}"); + html_escape("http://$config{web_domain}/Reporting$config{html_suffix}"); } - if (not $maint and not @{$param{bugs}}) { + if (not defined $maint and not @{$param{bugs}}) { print {$output} "

There is no record of the " . html_escape($package) . ($param{binary} ? " package" : " source package") . ", and no bugs have been filed against it.

"; diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index f3c7ff6..456bd69 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -259,7 +259,7 @@ my @packages = splitpackages($status{package}); foreach my $pkg (@packages) { $package{$pkg} = {maintainer => exists($maintainer{$pkg}) ? $maintainer{$pkg} : '(unknown)', - source => exists($pkgsrc{$pkg}) ? $pkgsrc{$pkg} : '(unknown)', + exists($pkgsrc{$pkg}) ? (source => $pkgsrc{$pkg}) : (), package => $pkg, }; } diff --git a/templates/en_US/cgi/bugreport_pkginfo.tmpl b/templates/en_US/cgi/bugreport_pkginfo.tmpl index 22806f7..4a39ba3 100644 --- a/templates/en_US/cgi/bugreport_pkginfo.tmpl +++ b/templates/en_US/cgi/bugreport_pkginfo.tmpl @@ -8,8 +8,10 @@ for my $package (values %package) { $output .= q(Maintainer for ).package_links(package=>$package->{package}).qq( is ). package_links(maintainer => $package->{maintainer}).qq(; ); - $output .= q(Source for ).package_links(package=>$package->{package}).qq( is ). - package_links(source => $package->{source}).qq(. ); + if (exists $package->{source}) { + $output .= q(Source for ).package_links(package=>$package->{package}).qq( is ). + package_links(source => $package->{source}).qq(. ); + } } $output; }

-- 2.39.2