Changeset 168
- Timestamp:
- 12/21/10 20:23:08 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Rpms.pm
r123 r168 31 31 } 32 32 33 =head2 rpms.queryformat PKGID, FORMAT33 =head2 rpms.queryformat( PKGID, FORMAT ) 34 34 35 35 Perform an C<rpm -q --qf> on the package having C<PKGID>. … … 49 49 } 50 50 51 =head2 rpms.tag PKGID, TAG51 =head2 rpms.tag( PKGID, TAG ) 52 52 53 53 Return the list of C<TAG> values for package C<PKGID> … … 185 185 )->get_column('pkgid')->all ]; 186 186 187 } 188 189 190 =head2 rpms.maintainers( PKGID ) 191 192 Return the maintainers for this package. 193 194 The list of maintainers is limited to distribution where the package is located. 195 196 If the package is a binary the C<SOURCERPM> tag is used to find the source rpm 197 name. 198 199 =cut 200 201 sub maintainers : XMLRPCLocal { 202 my ($self, $c, $pkgid) = @_; 203 204 my $binfo = $c->forward('/rpms/basicinfo', [ $pkgid ]); 205 my $rpmname; 206 if ($binfo->{issrc}) { 207 $rpmname = $binfo->{name}; 208 } else { 209 my $sourcerpm = $c->forward('queryformat', [ $pkgid, '%{SOURCERPM}' ]); 210 $sourcerpm =~ /^(.*)-([^-]+)-([^-]+)\.[^\.]+.rpm$/; 211 $rpmname = $1; 212 } 213 my %dist; 214 foreach (@{ $c->forward('/rpms/location', [ $pkgid ]) }) { 215 $dist{$_->{distribution}} = 1; 216 } 217 218 $c->forward('/maintainers/byrpm', [ $rpmname, [ keys %dist ] ]); 187 219 } 188 220 … … 335 367 } 336 368 337 =head2 rpms.location (PKGID)369 =head2 rpms.location( PKGID ) 338 370 339 371 Return all distribution where the package having C<PKGID> can be found.
Note: See TracChangeset
for help on using the changeset viewer.