Update of /cvsroot/fink/experimental/rangerrick/finkinfo/fink
In directory usw-pr-cvs1:/tmp/cvs-serv32041/finkinfo/fink

Added Files:
        fink-splitoffinstall.patch 
Log Message:
just doing some rearranging -- there, you happy, Clef? =)

--- NEW FILE: fink-splitoffinstall.patch ---
Index: perlmod/Fink/Engine.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Engine.pm,v
retrieving revision 1.63
diff -u -b -r1.63 Engine.pm
--- perlmod/Fink/Engine.pm      5 Aug 2002 01:26:32 -0000       1.63
+++ perlmod/Fink/Engine.pm      16 Aug 2002 17:54:26 -0000
@@ -1024,6 +1024,7 @@
       $any_installed = 1;
       $package = $item->[2];
 
+      my @batch_install;
 
       if (($item->[3] == $OP_REBUILD and not $already_rebuilt{$pkgname})
          or not $package->is_present()) {
@@ -1034,34 +1035,40 @@
        $package->phase_build();
 
        $already_rebuilt{$pkgname} = 1;
+      }
 
        my $parent;
-       if (@{$package->{_splitoffs}} > 0) {
+      if (exists $package->{_splitoffs} and @{$package->{_splitoffs}} > 0) {
          $parent = $package;
        } elsif (exists $package->{parent}) {
          $parent = $package->{parent};
        }
+
        if (defined $parent) {
-         my $splitoff;
          $already_rebuilt{$parent->get_name()} = 1;
-         foreach $splitoff (@{$package->{_splitoffs}}) {
+       foreach my $splitoff (@{$parent->{_splitoffs}}) {
            $already_rebuilt{$splitoff->get_name()} = 1;
            if ($splitoff->is_installed()) {
+           push(@batch_install, $splitoff) unless 
+($already_activated{$splitoff->get_name()});
+           $already_activated{$splitoff->get_name()} = 1;
+         } elsif (exists $deps{$splitoff->get_name()}) {
+           push(@batch_install, $splitoff) unless 
+($already_activated{$splitoff->get_name()});
              $already_activated{$splitoff->get_name()} = 1;
-             $splitoff->phase_activate();
-           }
          }
        }
       }
+
       # Install the package if necessary and if it wasn't already installed 
       # previously. "Necessary" means that the command issued by the user
       # was an "install", a "reinstall" or a "rebuild" of an installed pkg.
       if (not $already_activated{$pkgname} and
          ($item->[3] == $OP_INSTALL or $item->[3] == $OP_REINSTALL
           or ($item->[3] == $OP_REBUILD and $package->is_installed()))) {
+        push(@batch_install, $package) unless ($already_activated{$pkgname});
        $already_activated{$pkgname} = 1;
-       $package->phase_activate();
       }
+
+      Fink::PkgVersion::phase_activate(@batch_install) unless (@batch_install == 0);
 
       # mark it as installed
       $item->[4] |= 2;
Index: perlmod/Fink/PkgVersion.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v
retrieving revision 1.78
diff -u -b -r1.78 PkgVersion.pm
--- perlmod/Fink/PkgVersion.pm  12 Aug 2002 20:00:55 -0000      1.78
+++ perlmod/Fink/PkgVersion.pm  16 Aug 2002 17:54:27 -0000
@@ -1624,18 +1624,31 @@
 ### activate
 
 sub phase_activate {
-  my $self = shift;
-  my ($deb, $answer);
+  my @packages = @_;
+  my (@installable);
 
-  $deb = $self->find_debfile();
+  for my $package (@packages) {
+    my $deb = $package->find_debfile();
 
   unless (defined $deb and -f $deb) {
-    die "can't find package ".$self->get_debname()."\n";
+      die "can't find package ".$package->get_debname()."\n";
   }
 
-  if (&execute("dpkg -i $deb")) {
-    die "can't install package ".$self->get_fullname()."\n";
+    push(@installable, $deb);
   }
+
+  if (@installable == 0) {
+    die "no installable .deb files found!\n";
+  }
+
+  if (&execute("dpkg -i @installable")) {
+    if (@installable == 1) {
+      die "can't install package ".$installable[0]->get_fullname()."\n";
+    } else {
+      die "can't batch-install packages: @installable\n";
+    }
+  }
+
   Fink::Status->invalidate();
 }
 



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to