From: Andreas Barth Date: Wed, 3 Mar 2010 15:49:46 +0000 (+0000) Subject: list-order: X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=commitdiff_plain;h=61bb9b52682b538ddbfb997ec8c1903bbbdcd2b7 list-order: - move to yaml-file - building sorts by buildd, package name now --- diff --git a/bin/wanna-build b/bin/wanna-build index 6ced743..d1fc48e 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -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; diff --git a/etc/yaml/wanna-build.yaml b/etc/yaml/wanna-build.yaml index fcb2587..eb56539 100644 --- a/etc/yaml/wanna-build.yaml +++ b/etc/yaml/wanna-build.yaml @@ -20,3 +20,8 @@ priority: min: 0 max: 6 scale: 2 +list-order: + default: PScpsn + failed: fPcpsn + needs-build: CWn + building: bn