X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=lib%2FPackages%2FDoNewPkg.pm;h=60e6876c6274c53a044c933e9b48128e0d842bc9;hb=247ddb20960178df87239fe5c25cb31d37f9de03;hp=015d0559b49577d2348c8dc4cce3d71d6e7747f4;hpb=416227e3eff75fb13c805ec723a414f54bc7c372;p=deb%2Fpackages.git diff --git a/lib/Packages/DoNewPkg.pm b/lib/Packages/DoNewPkg.pm index 015d055..60e6876 100644 --- a/lib/Packages/DoNewPkg.pm +++ b/lib/Packages/DoNewPkg.pm @@ -16,10 +16,10 @@ use Packages::I18N::Locale; use Packages::Search qw( :all ); use Packages::CGI; use Packages::DB; -use Packages::Config qw( $TOPDIR @SECTIONS $HOSTNAME $ROOT ); +use Packages::Config qw( $TOPDIR @SECTIONS $ROOT ); sub do_newpkg { - my ($params, $opts, $html_header, $menu, $page_content) = @_; + my ($params, $opts, $page_content) = @_; if ($params->{errors}{suite}) { fatal_error( _g( "suite not valid or not specified" ) ); @@ -30,7 +30,7 @@ sub do_newpkg { my $sort_func = sub { $_[0][0] cmp $_[1][0] }; $sort_func = sub { $_[0][1] <=> $_[1][1] or $_[0][0] cmp $_[1][0] } - if $opts->{mode} eq 'byage'; + if $opts->{mode} eq 'byage'; my $suite = $opts->{suite}[0]; my $one_archive = @{$opts->{archive}} == 1 ? @@ -38,10 +38,6 @@ sub do_newpkg { my $one_section = @{$opts->{section}} == 1 ? $opts->{section}[0] : undef; - my @full_path = ($HOSTNAME, $ROOT, $suite); - push @full_path, $one_archive if $one_archive; - my $full_path = join( '/', @full_path ); - my @new_pkgs; #FIXME: move to Packages::DB? open NEWPKG, '<', "$TOPDIR/files/packages/newpkg_info" @@ -50,6 +46,7 @@ sub do_newpkg { chomp; my @data = split /\s/, $_, 10; + next unless $data[2]; #removed packages next unless $data[3] eq $suite; next if $one_archive and $data[2] ne $one_archive; next if $one_section and $data[5] ne $one_section; @@ -60,93 +57,18 @@ sub do_newpkg { close NEWPKG; (my @date)= gmtime(); - my $now_time = strftime ("%B %d, %Y", @date); - my $rss_time = strftime ("%Y-%m-%dT%H:%M+00:00", @date); - - unless ($opts->{format} eq 'rss') { - my $title = sprintf( _g( "New Packages in \"%s\"" ), - $suite ); - %$html_header = ( title => $title, - title_keywords => "debian, "._g('new packages').", $suite, @{$opts->{section}}", - meta => "", - lang => $opts->{lang}, - print_title => 1 ); - - $$page_content .= "
" - . sprintf(_g( "The following packages were added to suite %s%s in the Debian archive during the last 7 days."), $suite, - $one_section ? sprintf(_g(" (section %s)"),$one_section):'')."
" - . "".sprintf( _g( "This information is also available as an RSS feed." ), "newpkg?format=rss" ) - ."
"; - - if (@new_pkgs) { - $$page_content .= "\n".
- _g( "All packages" ) ."
(".
- _g( "compact compressed textlist" ).")
".
- ($slist ? sprintf(_g( "New packages in %s" ), $slist ):'').
- "