Update of /cvsroot/fink/scripts/buildfink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14060

Modified Files:
        buildfink 
Log Message:
Correctly handle Provides.  When a dep on X is satisfied, deps on anything that 
X provides are also satisfied.

Index: buildfink
===================================================================
RCS file: /cvsroot/fink/scripts/buildfink/buildfink,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- buildfink   29 Dec 2005 21:54:27 -0000      1.22
+++ buildfink   1 Mar 2006 20:17:31 -0000       1.23
@@ -636,13 +636,27 @@
 
                $deps->{$pkgname}->{ordered} = 2;
 
+               my @revdeps = @{$revdeps{$pkgname} || []};
+               my @provides = ($pkgname);
+
+               my $pkgobj = Fink::Package->package_by_name($pkgname);
+
+               # We've also satisfied things which depend on somethign we 
provide
+               foreach my $provider ($pkgobj->get_all_providers()) {
+                       my $pname = $provider->get_name();
+                       push @provides, $pname;
+                       push @revdeps, @{$revdeps{$pname} || []};
+               }
+
                # For every package that is depended on by this one...
-               foreach my $revdep (@{$revdeps{$pkgname}}) {
+               foreach my $revdep (@revdeps) {
                        my $dep = $deps->{$revdep};
 
                        # Remove this one from the list of unsatisfied deps...
-                       delete $dep->{unsatisfied}->{run}->{$pkgname};
-                       delete $dep->{unsatisfied}->{build}->{$pkgname};
+                       foreach my $pname(@provides) {
+                               delete $dep->{unsatisfied}->{run}->{$pname};
+                               delete $dep->{unsatisfied}->{build}->{$pname};
+                       }
 
                        # If we've satisfied all builddeps, we can build it.
                        next if keys(%{$dep->{unsatisfied}->{build}});



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to