better dependency matching
authorAnas Nashif <anas.nashif@intel.com>
Mon, 23 Jul 2012 08:29:28 +0000 (09:29 +0100)
committerAnas Nashif <anas.nashif@intel.com>
Mon, 23 Jul 2012 08:29:28 +0000 (09:29 +0100)
Change-Id: If75b4fd78599eb82e88dbe4e4cc0eef3d9054af9

depanneur

index f7a0c68..6cf12a2 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -489,18 +489,18 @@ if ($binarylist ne "" && -e $binarylist )
         print "$p, ";
     }
     print "\n";
-
     foreach my $p (@tobuild) {
         my @deps = @{$packs{$p}->{deps}};    
         foreach my $dep (@deps) {
             debug($dep);
             foreach my $prr (keys %repo_assist) {
-                debug("=====>" . $prr);
-                if (grep $_ eq $dep, @{$repo_assist{$prr}->{provides}}) {
-                    my $mainp = source_of($prr, %packs);
+                debug("=> " . $prr);
+                $dep =~ m/([^\s]+)/;
+                if (grep $_ eq $1, @{$repo_assist{$prr}->{provides}}) {
+                    my $mainp = source_of($1, %packs);
                     if (defined($mainp)) {
-                        push(@tobuild, $mainp);
                         debug("adding $mainp because $p needs it");
+                        push(@tobuild, $mainp);
                     }
                 }
             }