From: Andreas Barth Date: Sun, 11 Apr 2010 16:41:12 +0000 (+0000) Subject: workaround: makes --list=needs-build faster again while optimizing the queries X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=commitdiff_plain;h=97f498849c04f6c520cd96650fb5a24ebdf3c732 workaround: makes --list=needs-build faster again while optimizing the queries --- diff --git a/bin/wanna-build b/bin/wanna-build index 5570662..bfe8ac7 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -2566,11 +2566,10 @@ sub get_all_source_info { push @args, uc($options{state}); } - if ($options{user}) { + if ($options{user} && uc($options{state}) ne "NEEDS-BUILD") { # if it's NEEDS-BUILD, we don't look at users #this basically means "this user, or no user at all": - $q .= ' AND (builder = ? OR upper(state) = ?)'; + $q .= " AND (builder = ? OR upper(state) = 'NEEDS-BUILD')"; push @args, $options{user}; - push @args, "NEEDS-BUILD"; } if ($options{category}) {