- fix perl syntax, don't leak fd
authorMichael Schroeder <mls@suse.de>
Tue, 16 Feb 2010 14:39:22 +0000 (15:39 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 16 Feb 2010 14:39:22 +0000 (15:39 +0100)
Build/Kiwi.pm
Build/Zypp.pm

index d10e498..e15689b 100644 (file)
@@ -115,10 +115,10 @@ sub kiwiparse {
     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'}) {
index bc0340f..4b17cf8 100644 (file)
@@ -11,19 +11,19 @@ sub parsecfg($)
   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;
 }