mirror of
https://github.com/webmin/webmin.git
synced 2025-07-21 23:40:34 +00:00
Exclude packages already being updated from lists of updates
This commit is contained in:
@ -706,9 +706,10 @@ sub get_update_progress
|
||||
my @rv;
|
||||
foreach my $f (glob("$update_progress_dir/*")) {
|
||||
my %u;
|
||||
&read_file($f, $u) || next;
|
||||
kill(0, $u->{'pid'}) || next;
|
||||
push(@rv, $u);
|
||||
&read_file($f, \%u) || next;
|
||||
$u{'pid'} || next;
|
||||
kill(0, $u{'pid'}) || next;
|
||||
push(@rv, \%u);
|
||||
}
|
||||
return @rv;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ else {
|
||||
|
||||
# Do it
|
||||
$msg = $in{'mode'} eq 'new' ? 'update_pkg2' : 'update_pkg';
|
||||
&start_update_progress(\@pkgs);
|
||||
&start_update_progress([ map { (split(/\//, $_))[0] } @pkgs ]);
|
||||
if ($config{'update_multiple'} && @pkgs > 1) {
|
||||
# Update all packages at once
|
||||
@pkgnames = ( );
|
||||
|
@ -17,7 +17,7 @@ foreach $a (@todo) {
|
||||
# Install packages that are needed
|
||||
$tellcount = 0;
|
||||
%already = ( );
|
||||
&start_update_progress(\@todo);
|
||||
&start_update_progress([ map { $_->{'name'} } @todo ]);
|
||||
foreach $t (@todo) {
|
||||
next if ($already{$t->{'update'}});
|
||||
if ($t->{'level'} <= $config{'sched_action'}) {
|
||||
@ -41,7 +41,7 @@ foreach $t (@todo) {
|
||||
$tellcount++;
|
||||
}
|
||||
}
|
||||
&end_update_progress(\@todo);
|
||||
&end_update_progress();
|
||||
|
||||
if ($tellcount) {
|
||||
# Add link to Webmin
|
||||
|
@ -247,6 +247,12 @@ if ($info->{'disk_fs'} && &show_section('disk')) {
|
||||
# Package updates
|
||||
if ($info->{'poss'} && &show_section('poss')) {
|
||||
my @poss = @{$info->{'poss'}};
|
||||
&foreign_require("package-updates");
|
||||
my %prog;
|
||||
foreach my $p (&package_updates::get_update_progress()) {
|
||||
%prog = (%prog, (map { $_, 1 } split(/\s+/, $p->{'pkgs'})));
|
||||
}
|
||||
@poss = grep { !$prog{$_->{'name'}} } @poss;
|
||||
my @secs = grep { $_->{'security'} } @poss;
|
||||
my $msg;
|
||||
if (@poss && @secs) {
|
||||
|
Reference in New Issue
Block a user