next unless @{$preferences->{'type'}} == 1 || !$type->{'optional'};
if (defined $type->{'image'}) {
# for kiwi 4.1
- push @types, $type->{'image'}
- }else{
+ push @types, $type->{'image'};
+ } else {
# for kiwi 3.8 and before
- push @types, $type->{'_content'}
+ push @types, $type->{'_content'};
}
push @packages, "kiwi-filesystem:$type->{'filesystem'}" if $type->{'filesystem'};
if (defined $type->{'boot'}) {
open(REPO, '<', $repocfg) or return undef;
my $name;
my $repo = {};
- while(<REPO>) {
+ while (<REPO>) {
chomp;
- if(/^\[(.+)\]/) {
+ if (/^\[(.+)\]/) {
$name = $1;
} else {
my ($key, $value) = split(/=/,$_,2);
$repo->{$key} = $value;
}
}
+ close(REPO);
return undef unless $name;
$repo->{'description'} = $repo->{'name'} if exists $repo->{'name'};
$repo->{'name'} = $name;
- close(REPO);
return $repo;
}