From: Andreas Barth Date: Fri, 29 Apr 2011 21:12:13 +0000 (+0000) Subject: check if architecture exists for selected suite X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=commitdiff_plain;h=a79b1c9284e2013e4fa5cce66c001411db3ebee4 check if architecture exists for selected suite --- diff --git a/bin/wanna-build b/bin/wanna-build index 1fb5b90..477d5f4 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -348,6 +348,10 @@ if (isin($op_mode, qw) && defined @conf::admin_user } if (!isin($op_mode, qw)) { die "need an architecture" unless $arch; + my $rows = $dbh->selectall_hashref('SELECT distribution as d from distribution_architectures where architecture=? and distribution=?', [qw], undef, ($arch, $distribution)) if $distribution; + $rows = $dbh->selectall_hashref('SELECT distribution as d from distribution_architectures where architecture=?', [qw], undef, ($arch,)) unless $rows; + die "architecture ($arch) does not exist (at least not for $distribution)" if !keys %$rows and $distribution; + die "architecture ($arch) does not exist" if !keys %$rows; } SWITCH: foreach ($op_mode) {