Skip to content

Commit

Permalink
parse sourcemedium/debugmedium for kiwi product builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Nov 12, 2013
1 parent 6a198d7 commit 833ea52
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Build/Kiwi.pm
Expand Up @@ -173,7 +173,7 @@ sub kiwiparse {

my $instsource = ($kiwi->{'instsource'} || [])->[0];
if ($instsource) {
foreach my $repository(sort {$a->{priority} <=> $b->{priority}} @{$instsource->{'instrepo'} || []}) {
for my $repository(sort {$a->{priority} <=> $b->{priority}} @{$instsource->{'instrepo'} || []}) {
my $kiwisource = ($repository->{'source'} || [])->[0];
if ($kiwisource->{'path'} eq 'obsrepositories:/') {
# special case, OBS will expand it.
Expand All @@ -183,11 +183,17 @@ sub kiwiparse {
die("bad instsource path: $kiwisource->{'path'}\n") unless $kiwisource->{'path'} =~ /^obs:\/\/\/?([^\/]+)\/([^\/]+)\/?$/;
push @repos, "$1/$2";
}
$ret->{'sourcemedium'} = -1;
$ret->{'debugmedium'} = -1;
if ($instsource->{'productoptions'}) {
my $productoptions = $instsource->{'productoptions'}->[0] || {};
for my $po (@{$productoptions->{'productvar'} || []}) {
$ret->{'version'} = $po->{'_content'} if $po->{'name'} eq 'VERSION';
}
for my $po (@{$productoptions->{'productoption'} || []}) {
$ret->{'sourcemedium'} = $po->{'_content'} if $po->{'name'} eq 'SOURCEMEDIUM';
$ret->{'debugmedium'} = $po->{'_content'} if $po->{'name'} eq 'DEBUGMEDIUM';
}
}
if ($instsource->{'architectures'}) {
my $a = $instsource->{'architectures'}->[0] || {};
Expand Down

0 comments on commit 833ea52

Please sign in to comment.