From: Andreas Barth Date: Wed, 30 Mar 2011 22:10:56 +0000 (+0000) Subject: remove more warnings X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9b69d1208fdef1d4ae72f71d9323544510e9de74;p=wannabuild.git remove more warnings sort_order: update code for S (>= standard) --- diff --git a/bin/wanna-build b/bin/wanna-build index 36cebc9..af3ace7 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -1444,13 +1444,13 @@ sub sort_list_func { 'C' => ['<->', sub { return $_[0]->{'calprio'}; }], 'W' => ['<->', sub { return $_[0]->{'state_days'}; }], 'P' => ['<->', sub { return $_[0]->{'buildpri'}; }], - 'p' => ['<=>', sub { return $prioval{$_[0]->{'priority'}}; }], - 's' => ['<=>', sub { return $sectval{$_[0]->{'section'}}; }], + 'p' => ['<=>', sub { return $prioval{$_[0]->{'priority'}//""}//0; }], + 's' => ['<=>', sub { return $sectval{$_[0]->{'section'}//""}//0; }], 'n' => ['cmp', sub { return $_[0]->{'package'}; }], 'b' => ['cmp', sub { return $_[0]->{'builder'}; }], - 'c' => ['<=>', sub { return ($_[0]->{'notes'} =~ /^(out-of-date|partial)/) ? 0: ($_[0]->{'notes'} =~ /^uncompiled/) ? 2 : 1; }], + 'c' => ['<=>', sub { return ($_[0]->{'notes'}//"" =~ /^(out-of-date|partial)/) ? 0: ($_[0]->{'notes'}//"" =~ /^uncompiled/) ? 2 : 1; }], 'f' => ['<=>', sub { return $catval{ $_[0]->{'failed_category'} ? $_[0]->{'failed_category'}: "none" }; }], - 'S' => ['<=>', sub { return $prioval{$_[0]->{'priority'}} > $prioval{'standard'}; }], + 'S' => ['<->', sub { return isin($_[0]->{'priority'}, qw(required important standard)); }], 'T' => ['<->', sub { return $_[0]->{'state_time'} % 86400;} ], # Fractions of a day };