From 09fb5c8a6858850e45adea21c2b8644babfec3de Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 4 Sep 2007 01:15:28 +0200 Subject: [PATCH] Packages::*: More Perl warning fixes --- lib/Packages/Dispatcher.pm | 2 +- lib/Packages/DoNewPkg.pm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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; -- 2.39.2