Don't re-install dependencies
authorJamie Cameron <jcameron@webmin.com>
Fri, 22 Oct 2010 23:07:15 +0000 (16:07 -0700)
committerJamie Cameron <jcameron@webmin.com>
Fri, 22 Oct 2010 23:07:15 +0000 (16:07 -0700)
package-updates/update.pl

index 3524a32..ffd7b3e 100755 (executable)
@@ -16,7 +16,9 @@ foreach $a (@todo) {
 
 # Install packages that are needed
 $tellcount = 0;
+%already = ( );
 foreach $t (@todo) {
+       next if ($already{$t->{'update'}});
        if ($t->{'level'} <= $config{'sched_action'}) {
                # Can install
                $body .= "An update to $t->{'name'} from $t->{'oldversion'} to $t->{'version'} is needed.\n";
@@ -28,6 +30,9 @@ foreach $t (@todo) {
                else {
                        $body .= "However, this update could not be installed! Try the update manually\nusing the Package Updates module.\n\n";
                        }
+               foreach $p (@$done) {
+                       $already{$p}++;
+                       }
                }
        else {
                # Just tell the user about it