Skip to content

Commit

Permalink
- fix whitespace (revert large part of e7cba6)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 8, 2009
1 parent d32fc3a commit c8b33e4
Show file tree
Hide file tree
Showing 17 changed files with 2,171 additions and 2,171 deletions.
314 changes: 157 additions & 157 deletions Build.pm

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions Build/Deb.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,32 @@ sub parse {
} elsif ($tag eq 'BUILD-DEPENDS' || $tag eq 'BUILD-CONFLICTS' || $tag eq 'BUILD-IGNORE' || $tag eq 'BUILD-DEPENDS-INDEP') {
my @d = split(/,\s*/, $data);
for my $d (@d) {
if ($d =~ /^(.*?)\s*\[(.*)\]$/) {
$d = $1;
my $isneg = 0;
my $bad;
for my $q (split('[\s,]', $2)) {
$isneg = 1 if $q =~ s/^\!//;
$bad = 1 if !defined($bad) && !$isneg;
if ($isneg) {
if ($q eq $arch || $q eq "$os-$arch") {
$bad = 1;
last;
}
} elsif ($q eq $arch || $q eq "$os-$arch") {
$bad = 0;
}
}
next if $bad;
}
$d =~ s/ \(([^\)]*)\)/ $1/g;
$d =~ s/>>/>/g;
$d =~ s/<</</g;
if ($tag eq 'BUILD-DEPENDS' || $tag eq 'BUILD-DEPENDS-INDEP') {
push @deps, $d;
} else {
push @deps, "-$d";
}
if ($d =~ /^(.*?)\s*\[(.*)\]$/) {
$d = $1;
my $isneg = 0;
my $bad;
for my $q (split('[\s,]', $2)) {
$isneg = 1 if $q =~ s/^\!//;
$bad = 1 if !defined($bad) && !$isneg;
if ($isneg) {
if ($q eq $arch || $q eq "$os-$arch") {
$bad = 1;
last;
}
} elsif ($q eq $arch || $q eq "$os-$arch") {
$bad = 0;
}
}
next if $bad;
}
$d =~ s/ \(([^\)]*)\)/ $1/g;
$d =~ s/>>/>/g;
$d =~ s/<</</g;
if ($tag eq 'BUILD-DEPENDS' || $tag eq 'BUILD-DEPENDS-INDEP') {
push @deps, $d;
} else {
push @deps, "-$d";
}
}
}
}
Expand Down
46 changes: 23 additions & 23 deletions Build/Kiwi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ sub parsexml {
my $n = {};
push @{$node->{$tag}}, $n;
for (sort keys %atts) {
$n->{$_} = $atts{$_};
$n->{$_} = $atts{$_};
}
if ($mode == 0) {
push @nodestack, [ $tag, $node, $c ];
$c = '';
$node = $n;
push @nodestack, [ $tag, $node, $c ];
$c = '';
$node = $n;
}
} else {
die("element '$tag' closes without open\n") unless @nodestack;
Expand Down Expand Up @@ -117,17 +117,17 @@ sub kiwiparse {
push @packages, "kiwi-filesystem:$type->{'filesystem'}" if $type->{'filesystem'};
if (defined $type->{'boot'}) {
if ($type->{'boot'} =~ /^obs:\/\/\/?([^\/]+)\/([^\/]+)\/?$/) {
next unless $bootcallback;
my ($bootxml, $xsrc) = $bootcallback->($1, $2);
next unless $bootxml;
push @extrasources, $xsrc if $xsrc;
my $bret = kiwiparse($bootxml, $arch, $count);
push @bootrepos, map {"$_->{'project'}/$_->{'repository'}"} @{$bret->{'path'} || []};
push @packages, @{$bret->{'deps'} || []};
push @extrasources, @{$bret->{'extrasource'} || []};
next unless $bootcallback;
my ($bootxml, $xsrc) = $bootcallback->($1, $2);
next unless $bootxml;
push @extrasources, $xsrc if $xsrc;
my $bret = kiwiparse($bootxml, $arch, $count);
push @bootrepos, map {"$_->{'project'}/$_->{'repository'}"} @{$bret->{'path'} || []};
push @packages, @{$bret->{'deps'} || []};
push @extrasources, @{$bret->{'extrasource'} || []};
} else {
die("bad boot reference: $type->{'boot'}\n") unless $type->{'boot'} =~ /^([^\/]+)\/([^\/]+)$/;
push @packages, "kiwi-boot:$1";
die("bad boot reference: $type->{'boot'}\n") unless $type->{'boot'} =~ /^([^\/]+)\/([^\/]+)$/;
push @packages, "kiwi-boot:$1";
}
}
}
Expand All @@ -141,24 +141,24 @@ sub kiwiparse {
}
for my $repopackages (@{$instsource->{'repopackages'} || []}) {
for my $repopackage (@{$repopackages->{'repopackage'} || []}) {
push @packages, $repopackage->{'name'};
push @packages, $repopackage->{'name'};
}
}
if ($instsource->{'metadata'}) {
for my $repopackage (@{$instsource->{'metadata'}->[0]->{'repopackage'} || []}) {
push @packages, $repopackage->{'name'};
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';
$ret->{'version'} = $po->{'_content'} if $po->{'name'} eq 'VERSION';
}
}
if ($instsource->{'architectures'}) {
my $a = $instsource->{'architectures'}->[0] || {};
for my $ra (@{$a->{'requiredarch'} || []}) {
push @requiredarch, $ra->{'ref'} if defined($ra->{'ref'});
push @requiredarch, $ra->{'ref'} if defined($ra->{'ref'});
}
}
}
Expand All @@ -181,11 +181,11 @@ sub kiwiparse {
for my $packagegroup (@{$kiwi->{'packages'} || []}) {
for my $package (@{$packagegroup->{'package'} || []}) {
if ($package->{'arch'}) {
my $ma = $arch;
$ma =~ s/i[456]86/i386/;
my $pa = $package->{'arch'};
$pa =~ s/i[456]86/i386/;
next if $ma ne $pa;
my $ma = $arch;
$ma =~ s/i[456]86/i386/;
my $pa = $package->{'arch'};
$pa =~ s/i[456]86/i386/;
next if $ma ne $pa;
}
push @packages, $package->{'name'};
}
Expand Down
Loading

0 comments on commit c8b33e4

Please sign in to comment.