X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI%2FPkgreport.pm;h=2d0de6f6c74803a704948c31e9fb7ba1961e34ce;hb=5be51c11e02e9b3ade84ff8306fdd8b5e89ab577;hp=beba95a89694f563b6085fccf20664d66ee9b800;hpb=fe3cb56ad04bdfdd05bb7066514228657180105c;p=debbugs.git diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm index beba95a..2d0de6f 100644 --- a/Debbugs/CGI/Pkgreport.pm +++ b/Debbugs/CGI/Pkgreport.pm @@ -41,6 +41,7 @@ use Debbugs::Bugs qw(bug_filter); use Debbugs::Packages qw(:mapping); use Debbugs::Text qw(:templates); +use Encode qw(encode_utf8); use POSIX qw(strftime); @@ -51,13 +52,9 @@ BEGIN{ @EXPORT = (); %EXPORT_TAGS = (html => [qw(short_bug_status_html pkg_htmlizebugs), - qw(pkg_javascript), - qw(pkg_htmlselectyesno pkg_htmlselectsuite), - qw(buglinklist pkg_htmlselectarch) ], - misc => [qw(generate_package_info make_order_list), - qw(myurl), - qw(get_bug_order_index determine_ordering), + misc => [qw(generate_package_info), + qw(determine_ordering), ], ); @EXPORT_OK = (qw()); @@ -78,7 +75,7 @@ sub generate_package_info{ spec => {binary => {type => BOOLEAN, default => 1, }, - package => {type => SCALAR|ARRAYREF, + package => {type => SCALAR,#|ARRAYREF, }, options => {type => HASHREF, }, @@ -110,7 +107,9 @@ sub generate_package_info{ print {$output} ".
\n"; } else { - print {$output} "No maintainer for $showpkg. Please do not report new bugs against this package.
\n"; + print {$output} "There is no maintainer for $showpkg. ". + "This means that this package no longer exists (or never existed). ". + "Please do not report new bugs against this package.
\n"; } my @pkgs = getsrcpkgs($srcforpkg); @pkgs = grep( !/^\Q$package\E$/, @pkgs ); @@ -132,6 +131,13 @@ sub generate_package_info{ push @references, "to the ". "list of other pseudo-packages"; } + elsif (not defined $maint and not @{$param{bugs}}) { + # don't bother printing out this information, because it's + # already present above. + # print {$output} "There is no record of the " . html_escape($package) . + # ($param{binary} ? " package" : " source package") . + # ", and no bugs have been filed against it.
"; + } else { if ($package and defined $config{package_pages} and length $config{package_pages}) { push @references, sprintf "to the %s package page", @@ -140,6 +146,8 @@ sub generate_package_info{ if (defined $config{subscription_domain} and length $config{subscription_domain}) { my $ptslink = $param{binary} ? $srcforpkg : $package; + # the pts only wants the source, and doesn't care about src: (#566089) + $ptslink =~ s/^src://; push @references, q(to the Package Tracking System); } # Only output this if the source listing is non-trivial. @@ -160,12 +168,7 @@ sub generate_package_info{ printf {$output} "report it.\n", html_escape("http://$config{web_domain}/Reporting$config{html_suffix}"); } - 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.
"; - } - return $output_scalar; + return encode_utf8($output_scalar); } @@ -222,7 +225,7 @@ sub short_bug_status_html { if (@blockedby && $status{"pending"} ne 'fixed' && ! length($status{done})) { for my $b (@blockedby) { my %s = %{get_bug_status($b)}; - next if $s{"pending"} eq 'fixed' || length $s{done}; + next if (defined $s{pending} and $s{pending} eq 'fixed') or (defined $s{done} and length $s{done}); push @{$status{blockedby_array}},{bug_num => $b, subject => $s{subject}, status => \%s}; } } @@ -232,7 +235,7 @@ sub short_bug_status_html { if (@blocks && $status{"pending"} ne 'fixed' && ! length($status{done})) { for my $b (@blocks) { my %s = %{get_bug_status($b)}; - next if $s{"pending"} eq 'fixed' || length $s{done}; + next if (defined $s{pending} and $s{pending} eq 'fixed') or (defined $s{done} and length $s{done}); push @{$status{blocks_array}}, {bug_num => $b, subject => $s{subject}, status => \%s}; } } @@ -307,8 +310,6 @@ sub pkg_htmlizebugs { my $header = ''; my $footer = "