]> git.donarmstrong.com Git - debbugs.git/commitdiff
* fix the src:package bits for bugreport.cgi
authorDon Armstrong <don@donarmstrong.com>
Wed, 20 May 2009 16:27:22 +0000 (09:27 -0700)
committerDon Armstrong <don@donarmstrong.com>
Wed, 20 May 2009 16:27:22 +0000 (09:27 -0700)
Debbugs/CGI.pm
cgi/bugreport.cgi
templates/en_US/cgi/bugreport_pkginfo.tmpl

index 3285d52620a686882fc8915f77c02c96ce599019..d305aed7e2724261fa1c3723846bc378e0351a02 100644 (file)
@@ -404,7 +404,7 @@ sub package_links {
                                       %options,
                                       $type => $_,
                                      ),
-                            $_);
+                            ($type eq 'src'?'src:':'').$_);
                       } make_list($param{$type}) if exists $param{$type};
      }
      for my $type (qw(maint owner submitter correspondent)) {
index a151b219478d8f93f1e0087e33cc2704f7ebb5ea..790e1a2ce5dc1a23f9eb385f45ba6f3792e189b7 100755 (executable)
@@ -292,10 +292,20 @@ my %package;
 my @packages = splitpackages($status{package});
 
 foreach my $pkg (@packages) {
-     $package{$pkg} = {maintainer => exists($maintainer{$pkg}) ? $maintainer{$pkg} : '(unknown)',
-                      exists($pkgsrc{$pkg}) ? (source => $pkgsrc{$pkg}) : (),
-                      package    => $pkg,
-                     };
+     if ($pkg =~ /^src\:/) {
+         my ($srcpkg) = $pkg =~ /^src:(.*)/;
+         $package{$pkg} = {maintainer => exists($maintainer{$srcpkg}) ? $maintainer{$srcpkg} : '(unknown)',
+                           source     => $srcpkg,
+                           package    => $pkg,
+                           is_source  => 1,
+                          };
+     }
+     else {
+         $package{$pkg} = {maintainer => exists($maintainer{$pkg}) ? $maintainer{$pkg} : '(unknown)',
+                           exists($pkgsrc{$pkg}) ? (source => $pkgsrc{$pkg}) : (),
+                           package    => $pkg,
+                          };
+     }
 }
 
 # fixup various bits of the status
index 4a39ba375ddc4a1da94081b8d97baa0ddbfa35c3..872aff44fc0913a75b4c0c0789a79fd2ef169c75 100644 (file)
@@ -1,14 +1,15 @@
 <div class="pkginfo">
   <p>{if (keys %package > 1) { q(Packages)} else {q(Package)}}:
-     {join(q(, ),package_links(package => [map {$_->{package}} values %package],
+     {join(q(, ),package_links(package => [map {$_->{package}} grep {!$_->{is_source}} values %package],
+                               source  => [map {$_->{source} } grep { $_->{is_source}} values %package],
                                class => q(submitter),
                               )
           )};
 {my $output ='';
  for my $package (values %package) {
-     $output .= q(Maintainer for ).package_links(package=>$package->{package}).qq( is ).
+     $output .= q(Maintainer for ).package_links($package->{is_source}?(source=>$package->{source}):(package=>$package->{package})).qq( is ).
                 package_links(maintainer => $package->{maintainer}).qq(; );
-     if (exists $package->{source}) {
+     if (exists $package->{source} and not $package->{is_source}) {
        $output .= q(Source for ).package_links(package=>$package->{package}).qq( is ).
                    package_links(source => $package->{source}).qq(. );
      }