From: Frank Lichtenheld Date: Mon, 3 Sep 2007 23:15:28 +0000 (+0200) Subject: Packages::*: More Perl warning fixes X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=09fb5c8a6858850e45adea21c2b8644babfec3de;p=deb%2Fpackages.git Packages::*: More Perl warning fixes --- diff --git a/lib/Packages/Dispatcher.pm b/lib/Packages/Dispatcher.pm index 64790c1..4c3c31f 100755 --- a/lib/Packages/Dispatcher.pm +++ b/lib/Packages/Dispatcher.pm @@ -271,7 +271,7 @@ sub do_dispatch { array => ',', var => \@archs, replace => { any => \@ARCHITECTURES } }, format => { default => 'html', match => '^([\w.]+)$', }, - mode => { default => undef, match => '^(\w+)$', }, + mode => { default => '', match => '^(\w+)$', }, sort_by => { default => 'file', match => '^(\w+)$', }, ); my %opts; diff --git a/lib/Packages/DoNewPkg.pm b/lib/Packages/DoNewPkg.pm index c9e0ca2..60e6876 100644 --- a/lib/Packages/DoNewPkg.pm +++ b/lib/Packages/DoNewPkg.pm @@ -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 ? @@ -46,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;