]> git.donarmstrong.com Git - wannabuild.git/commitdiff
list-order:
authorAndreas Barth <aba@not.so.argh.org>
Wed, 3 Mar 2010 15:49:46 +0000 (15:49 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Wed, 3 Mar 2010 15:49:46 +0000 (15:49 +0000)
- move to yaml-file
- building sorts by buildd, package name now

bin/wanna-build
etc/yaml/wanna-build.yaml

index 6ced74391379af1458d42e39f9975ad658528c51..d1fc48e167a988cba5adb5032bd1c9aff08bbadb 100755 (executable)
@@ -239,8 +239,6 @@ while( @ARGV && $ARGV[0] =~ /^-/ ) {
 
 $op_mode = $category ? "set-failed" : "set-building"
        if !$op_mode; # default operation
-$list_order = { "failed" =>  'fPcpsn', "needs-build" => "CWn" }->{$list_state} if !$list_order and $list_state;
-$list_order ||= 'PScpsn';
 $distribution ||= "unstable";
 die "Bad distribution '$distribution'\n"
        if !isin($distribution, keys %conf::distributions);
@@ -318,6 +316,8 @@ foreach my $file (@files) {
 if (not $yamlmap) {
        die "FATAL: no configuration found\n";
 }
+$list_order = $yamlmap->{"list-order"}{$list_state} if !$list_order and $list_state;
+$list_order ||= $yamlmap->{"list-order"}{'default'};
 
 my $dbh;
 
index fcb2587dfff77fa286553d1cf5bc3940e16facbb..eb56539142aa42da922d5be7dec79ad755b3c839 100644 (file)
@@ -20,3 +20,8 @@ priority:
         min: 0
         max: 6
         scale: 2
+list-order:
+    default: PScpsn
+    failed: fPcpsn
+    needs-build: CWn
+    building: bn