X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoIndex.pm;h=40f79fd67ac28784ff33da2349a752b35678e3d5;hb=aa511b16180f384ce387125161e8a402bb90a6a2;hp=ac4cd67437c35583e693f5b94c918d215727ecf1;hpb=9083dcf3a523120cfb4cd905d26dada501678aea;p=deb%2Fpackages.git diff --git a/lib/Packages/DoIndex.pm b/lib/Packages/DoIndex.pm index ac4cd67..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,8 +51,8 @@ sub send_file { my $wwwdir = "$TOPDIR/www"; my $path = ""; $path .= "source/" if $opts->{source}; - $path .= "$opts->{suite}[0]/"; -# $path .= "$opts->{archive}[0]/" if @{$opts->{archive}} == 1; + $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}}; $path .= "$file.$opts->{po_lang}.$opts->{format}";