do_subst: ignore relations when doing substitutions
authorMichael Schroeder <mls@suse.de>
Wed, 24 Mar 2010 17:17:12 +0000 (18:17 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 24 Mar 2010 17:17:12 +0000 (18:17 +0100)
Build.pm

index 6756ada..566538f 100644 (file)
--- a/Build.pm
+++ b/Build.pm
@@ -268,9 +268,11 @@ sub do_subst {
   while (@deps) {
     my $d = shift @deps;
     next if $done{$d};
-    if ($subst->{$d}) {
-      unshift @deps, @{$subst->{$d}};
-      push @res, $d if grep {$_ eq $d} @{$subst->{$d}};
+    my $ds = $d;
+    $ds =~ s/\s*[<=>].*$//s;
+    if ($subst->{$ds}) {
+      unshift @deps, @{$subst->{$ds}};
+      push @res, $d if grep {$_ eq $ds} @{$subst->{$ds}};
     } else {
       push @res, $d;
     }