On 2010-07-22 11:14:39 +0200, OBS build-service wrote:
From: Michael Schroeder
If the spec file comes from a POST, it does not make sense to use the subpackage information from the rpms on the server.
This reverts commit bf8b40b51d379aacc053dbbe537db4a920e8cee9. Hmm ok. Is the attached patch ok? The issue is that dsc's have no subpacks and in this case getting the buildinfo fails with "400 remote error: 'subpack' must be array".
diff --git a/src/backend/bs_repserver b/src/backend/bs_repserver index a8b259e..d202465 100755 --- a/src/backend/bs_repserver +++ b/src/backend/bs_repserver @@ -1763,7 +1763,7 @@ sub getbuildinfo { } my $pname = $info->{'name'}; my @subpacks = grep {defined($dep2src{$_}) && $dep2src{$_} eq $pname} keys %dep2src; - if ($info->{'subpacks'} && !@subpacks) { + if ($info->{'subpacks'} || !@subpacks) { $ret->{'subpack'} = $info->{'subpacks'}; } else { $ret->{'subpack'} = [ @subpacks ];
Marcus