summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAdrian Schröter <adrian@suse.de>2013-08-06 14:59:12 +0200
committerAdrian Schröter <adrian@suse.de>2013-08-06 14:59:12 +0200
commit86dc2ae94de21ba0fd8313e2bef39a288ab98912 (patch)
tree93156ff84c4a87a619a1a7ec7fa8a35e72df677d /Build
parent0ec4e5835adeb0b83cb53fdc25690ba65edf14e2 (diff)
- export kiwi-image:$type instead of kiwi-filesystem:$fs for kiwi files with schemaversion 5.6 or newer
Diffstat (limited to 'Build')
-rw-r--r--Build/Kiwi.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/Build/Kiwi.pm b/Build/Kiwi.pm
index 985c685..570d4e3 100644
--- a/Build/Kiwi.pm
+++ b/Build/Kiwi.pm
@@ -1,6 +1,7 @@
package Build::Kiwi;
use strict;
+use version;
our $bootcallback;
@@ -112,9 +113,12 @@ sub kiwiparse {
my @packages;
my @extrasources;
my @requiredarch;
+ my $schemaversion = 0;
+ my $schemaversion56 = version->parse("5.6");
my $kiwi = parsexml($xml);
die("not a kiwi config\n") unless $kiwi && $kiwi->{'image'};
$kiwi = $kiwi->{'image'}->[0];
+ $schemaversion = version->parse($kiwi->{'schemaversion'}) if $kiwi->{'schemaversion'};
$ret->{'filename'} = $kiwi->{'name'} if $kiwi->{'name'};
my $description = (($kiwi->{'description'} || [])->[0]) || {};
if ($description->{'specification'}) {
@@ -131,11 +135,12 @@ sub kiwiparse {
if (defined $type->{'image'}) {
# for kiwi 4.1 and 5.x
push @types, $type->{'image'};
+ push @packages, "kiwi-image:$type->{'image'}" if $schemaversion >= $schemaversion56;
} else {
# for kiwi 3.8 and before
push @types, $type->{'_content'};
+ push @packages, "kiwi-filesystem:$type->{'filesystem'}" if $type->{'filesystem'};
}
- push @packages, "kiwi-filesystem:$type->{'filesystem'}" if $type->{'filesystem'};
if (defined $type->{'boot'}) {
if ($type->{'boot'} =~ /^obs:\/\/\/?([^\/]+)\/([^\/]+)\/?$/) {
next unless $bootcallback;