X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoIndex.pm;h=40f79fd67ac28784ff33da2349a752b35678e3d5;hb=6a99f4714326a371636fae11a2613160a32d8c8f;hp=9eaf34e08135914a52013421881c49fb92d00e12;hpb=1e0b8833ffc8fa00e781ee09072599f18599a004;p=deb%2Fpackages.git diff --git a/lib/Packages/DoIndex.pm b/lib/Packages/DoIndex.pm index 9eaf34e..40f79fd 100644 --- a/lib/Packages/DoIndex.pm +++ b/lib/Packages/DoIndex.pm @@ -12,7 +12,12 @@ use Packages::Config qw( $TOPDIR ); use Packages::CGI; our @ISA = qw( Exporter ); -our @EXPORT = qw( do_index do_allpackages ); +our @EXPORT = qw( do_homepage do_index do_allpackages ); + +sub do_homepage { + $_[1]->{suite} = []; + return send_file( 'index', @_ ); +} sub do_index { return send_file( 'index', @_ ); @@ -46,7 +51,7 @@ sub send_file { my $wwwdir = "$TOPDIR/www"; my $path = ""; $path .= "source/" if $opts->{source}; - $path .= "$opts->{suite}[0]/"; + $path .= "$opts->{suite}[0]/" if @{$opts->{suite}}; $path .= "$opts->{archive}[0]/" if @{$opts->{archive}} == 1; $path .= "$opts->{subsection}[0]/" if @{$opts->{subsection}}; $path .= "$opts->{priority}[0]/" if @{$opts->{priority}};