From: Anas Nashif Date: Tue, 24 Jul 2012 03:49:01 +0000 (+0100) Subject: image dep calculation X-Git-Tag: 2.0_alpha~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dea49fdff3cad359160d6751c8c891e0fa783ba8;p=tools%2Fdepanneur.git image dep calculation Change-Id: I2e5b78e7118a2a2d55d33b56cf4a48c8475567ed --- diff --git a/depanneur b/depanneur index dc855cf..3e88855 100755 --- a/depanneur +++ b/depanneur @@ -515,29 +515,16 @@ if ($binarylist ne "" && -e $binarylist ) { chomp(@bins); close(FILE); foreach my $b (@bins) { - next if $b eq ""; - my $found = 0; - foreach my $name (keys %packs) { - my @sp = @{$packs{$name}->{subpacks}}; - my $debuginfo = $b; - my $nb; - $debuginfo =~ s/(.*)-debuginfo/$1/; - $debuginfo =~ s/(.*)-debugsource/$1/; - $debuginfo =~ s/(.*)-docs/$1/; - if ($b ne $debuginfo) { - $nb = $debuginfo; - } else { - $nb = $b; + open(EXPAND,"$virtualenv/usr/bin/do_expanddeps --dist $dist --depfile $order_dir/.repo.cache --archpath $archpath --configdir $dist_configs \"$b\" |") || die "Failed: $!\n"; + while ( ) { + chomp; + my $ddep = $_; + my $so = source_of($ddep, %packs); + if ( defined($so) && !(grep $_ eq $so, @tobuild)) { + push(@tobuild, $so); } - if ( grep $_ eq $nb, @sp ) { - push(@tobuild, $name); - $found = 1 ; - last; - } - } - if (!$found) { - push(@tofind, $b); - } + } + close(EXPAND); } print "Initial set:\n"; @@ -545,29 +532,6 @@ 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); - $dep =~ m/([^\s]+)/; - if (grep $_ eq $1, @{$repo_assist{$prr}->{provides}}) { - my $mainp = source_of($1, %packs); - if (defined($mainp)) { - debug("adding $mainp because $p needs it"); - push(@tobuild, $mainp); - } - } - } - } - } - debug("done"); - print "Improved set:\n"; - foreach my $p (@tobuild) { - print "$p, "; - } - print "\n"; foreach my $name (@tobuild) { my $fn = $packs{$name}->{filename};