Changeset 262 for server/trunk/web/lib/Sophie/Controller/Distrib.pm
- Timestamp:
- 01/01/11 20:20:40 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Distrib.pm
r259 r262 533 533 C<DISTRIBUTION>, C<RELEASE>, C<ARCH>. 534 534 535 This is likelly the same thing than C</rpm/ <PKGID>> but website will return 404536 err ur if the rpm is not in this distrib535 This is likelly the same thing than C</rpm/PKGID> but website will return 404 536 error if the rpm is not in this distrib 537 537 538 538 =cut … … 557 557 } 558 558 559 =head2 Url: /distrib/<DISTRIB>/<RELEASE>/<ARCH>/media/<MEDIA> 560 561 Return the list of rpms in media C<MEDIA> for distribution C<DISTRIB>, 562 C<RELEASE>, C<ARCH>. 563 564 The return list is an array of struct: 565 566 [ 567 { 568 filename => 'zvbi-0.2.33-5.fc14.x86_64.rpm', 569 pkgid => 'bb9cc5113f0de3e4c7140a1ee8694900' 570 }, 571 { 572 filename => 'zvbi-devel-0.2.33-5.fc14.i686.rpm', 573 pkgid => '2c3b41c5e1c475dfa31492998eb4de9f' 574 } 575 ] 576 577 =cut 578 559 579 sub media_list_rpms :Chained('_media_list_rpms') PathPart('') :Args(0) { 560 580 my ( $self, $c ) = @_; … … 562 582 } 563 583 584 =head2 Url: /distrib/<DISTRIB>/<RELEASE>/<ARCH>/media/<MEDIA>/rpms/<NAME> 585 586 Show binary rpm named C<NAME> in this distribution/media. 587 588 Return C<404> error if such rpm does not exists 589 590 =cut 591 564 592 sub media_rpm_byname :Chained('_media_list_rpms') PathPart('rpms') { 565 my ( $self, $c, $name ) = @_; 566 } 593 my ( $self, $c, $name, @subpart ) = @_; 594 $c->stash->{dist}{src} = 0; 595 ($c->stash->{pkgid}) = @{ $c->forward('/search/rpm/byname', 596 [ $c->stash->{dist}, $name ]) }; 597 $c->go('/404/index') unless ($c->stash->{pkgid}); 598 $c->go('/rpms/rpms', [ $c->stash->{pkgid}, @subpart ]); 599 } 600 601 =head2 Url: /distrib/<DISTRIB>/<RELEASE>/<ARCH>/media/<MEDIA>/srpms/<NAME> 602 603 Show source rpm named C<NAME> in this distribution/media. 604 605 Return C<404> error if such rpm does not exists 606 607 =cut 608 567 609 sub media_srpm_byname :Chained('_media_list_rpms') PathPart('srpms') { 568 my ( $self, $c, $name ) = @_; 569 } 610 my ( $self, $c, $name, @subpart ) = @_; 611 $c->stash->{dist}{src} = 0; 612 ($c->stash->{pkgid}) = @{ $c->forward('/search/rpm/byname', 613 [ $c->stash->{dist}, $name ]) }; 614 $c->go('/404/index') unless ($c->stash->{pkgid}); 615 $c->go('/rpms/rpms', [ $c->stash->{pkgid}, @subpart ]); 616 } 617 618 =head2 Url: /distrib/<DISTRIB>/<RELEASE>/<ARCH>/media/<MEDIA>/by-pkgid/<PKGID> 619 620 Show rpm having C<PKGID> in this distribution/media. 621 622 Return C<404> error if such rpm does not exists 623 624 =cut 570 625 571 626 sub media_rpm_bypkgid :Chained('_media_list_rpms') PathPart('by-pkgid') {
Note: See TracChangeset
for help on using the changeset viewer.