From d82b09c590a0a5756d46ae72b7a8e53fcbdf4aee Mon Sep 17 00:00:00 2001
From: Kurt Roeckx <kurt@roeckx.be>
Date: Sun, 20 Sep 2009 21:28:12 +0000
Subject: [PATCH] If no option is passed, we want to have all packages.

---
 bin/wanna-build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/wanna-build b/bin/wanna-build
index 313bc0b..4fe1d73 100755
--- a/bin/wanna-build
+++ b/bin/wanna-build
@@ -2430,7 +2430,7 @@ sub get_all_source_info {
 	my $q = 'SELECT * FROM ' . table_name()
 		. ' WHERE distribution = ? ';
 	my @args = ($distribution);
-	if (uc($options{state}) ne "ALL") {
+	if ($options{state} && uc($options{state}) ne "ALL") {
 		$q .= ' AND upper(state) = ? ';
 		push @args, uc($options{state});
 	}
-- 
2.39.5