- bring prereqs handling in sync with the obs backend
authorMichael Schroeder <mls@suse.de>
Mon, 20 Aug 2012 09:04:10 +0000 (11:04 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 20 Aug 2012 09:04:10 +0000 (11:04 +0200)
expanddeps

index a96d99e..a40bd33 100755 (executable)
@@ -258,8 +258,9 @@ if ($spec) {
   $packvers = $d->{'version'};
   $subpacks = $d->{'subpacks'};
   @packdeps = @{$d->{'deps'} || []};
-  for my $pr (@{$d->{'prereqs'} || []}) {
-    push @packdeps, $pr unless grep {$_ eq $pr} @$subpacks;
+  if ($d->{'prereqs'}) {
+    my %deps = map {$_ => 1} (@packdeps, @{$d->{'subpacks'} || []});
+    push @packdeps, grep {!$deps{$_} && !/^%/} @{$d->{'prereqs'}};
   }
 }