Mailinglist Archive: opensuse-buildservice (332 mails)

< Previous Next >
[opensuse-buildservice] Re: [PATCH] Revert "- fix for 3253ef6531e3720b5393ca7c41727fbf385c688d"
On 2010-07-22 11:14:39 +0200, OBS build-service wrote:
From: Michael Schroeder <mls@xxxxxxx>

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
diff --git a/src/backend/bs_repserver b/src/backend/bs_repserver
index a8b259e..eae0538 100755
--- a/src/backend/bs_repserver
+++ b/src/backend/bs_repserver
@@ -1763,9 +1763,9 @@ sub getbuildinfo {
}
my $pname = $info->{'name'};
my @subpacks = grep {defined($dep2src{$_}) && $dep2src{$_} eq $pname} keys
%dep2src;
- if ($info->{'subpacks'} && !@subpacks) {
+ if ($info->{'subpacks'}) {
$ret->{'subpack'} = $info->{'subpacks'};
- } else {
+ } elsif (@subpacks) {
$ret->{'subpack'} = [ @subpacks ];
}
my @deps = ( @{$info->{'dep'} || []}, @{$info->{'prereq'} || []} );
< Previous Next >
Follow Ups