]> git.donarmstrong.com Git - wannabuild.git/commitdiff
remove more warnings
authorAndreas Barth <aba@not.so.argh.org>
Wed, 30 Mar 2011 22:10:56 +0000 (22:10 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Wed, 30 Mar 2011 22:10:56 +0000 (22:10 +0000)
sort_order: update code for S (>= standard)

bin/wanna-build

index 36cebc96141ce2a48e42fce01c460b0f271478e2..af3ace755400dd8319c48a2518c00a0622dcc908 100755 (executable)
@@ -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
     };