From a8895524b0856e32e064bfdcccd0023b1cdee5f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20Schr=C3=B6der?= Date: Fri, 27 Feb 2009 10:09:27 +0000 Subject: [PATCH] - beautify... --- Build/Kiwi.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Build/Kiwi.pm b/Build/Kiwi.pm index a4afcb7..7c5dba1 100644 --- a/Build/Kiwi.pm +++ b/Build/Kiwi.pm @@ -111,12 +111,6 @@ sub kiwiparse { if ($preferences->{'version'}) { $ret->{'version'} = $preferences->{'version'}->[0]->{'_content'}; } - # override with product version, if existing - my $productoptions = (($kiwi->{'instsource'}[0]->{'productoptions'} || [])->[0]) || {}; - for my $po (@{$productoptions->{'productvar'} || []}) { - next unless $po->{'name'} eq "VERSION"; - $ret->{'version'} = $po->{'_content'}; - } for my $type (@{$preferences->{'type'} || []}) { next unless @{$preferences->{'type'}} == 1 || !$type->{'optional'}; push @types, $type->{'_content'}; @@ -153,7 +147,13 @@ sub kiwiparse { if ($instsource->{'metadata'}) { for my $repopackage (@{$instsource->{'metadata'}->[0]->{'repopackage'} || []}) { push @packages, $repopackage->{'name'}; - } + } + } + if ($instsource->{'productoptions'}) { + my $productoptions = $instsource->{'productoptions'}->[0] || {}; + for my $po (@{$productoptions->{'productvar'} || []}) { + $ret->{'version'} = $po->{'_content'} if $po->{'name'} eq 'VERSION'; + } } } -- 2.7.4