From 97f498849c04f6c520cd96650fb5a24ebdf3c732 Mon Sep 17 00:00:00 2001 From: Andreas Barth Date: Sun, 11 Apr 2010 16:41:12 +0000 Subject: [PATCH] workaround: makes --list=needs-build faster again while optimizing the queries --- bin/wanna-build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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}) { -- 2.39.2