From 91c69736ab5eded167150debfe3d61028284f58e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 5 Mar 2009 08:26:34 +0000 Subject: [PATCH] * use kiwi product version defined in productvar instead of hardcoded 1.0.0 --- Build/Kiwi.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Build/Kiwi.pm b/Build/Kiwi.pm index 7c5dba1..a5d0250 100644 --- a/Build/Kiwi.pm +++ b/Build/Kiwi.pm @@ -111,6 +111,12 @@ sub kiwiparse { if ($preferences->{'version'}) { $ret->{'version'} = $preferences->{'version'}->[0]->{'_content'}; } + # override with product version, if existing + my $productoptions = (($kiwi->{'productoptions'} || [])->[0]) || {}; + for my $po (@{$productoptions->{'productvar'} || []}) { + next unless @{$po->{'name'}} == "VERSION"; + $ret->{'version'} = $po->{'_content'}; + } for my $type (@{$preferences->{'type'} || []}) { next unless @{$preferences->{'type'}} == 1 || !$type->{'optional'}; push @types, $type->{'_content'}; -- 2.7.4