]> git.donarmstrong.com Git - wannabuild.git/commitdiff
workaround: makes --list=needs-build faster again while optimizing the queries
authorAndreas Barth <aba@not.so.argh.org>
Sun, 11 Apr 2010 16:41:12 +0000 (16:41 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Sun, 11 Apr 2010 16:41:12 +0000 (16:41 +0000)
bin/wanna-build

index 5570662d06438b65a7d85c82e451f587aeffc26e..bfe8ac7dd5e2e8b475a22d6cd8a7a6df28408afa 100755 (executable)
@@ -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}) {