mirror of
https://github.com/webmin/webmin.git
synced 2025-07-23 00:30:33 +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;
|
my @rv;
|
||||||
foreach my $f (glob("$update_progress_dir/*")) {
|
foreach my $f (glob("$update_progress_dir/*")) {
|
||||||
my %u;
|
my %u;
|
||||||
&read_file($f, $u) || next;
|
&read_file($f, \%u) || next;
|
||||||
kill(0, $u->{'pid'}) || next;
|
$u{'pid'} || next;
|
||||||
push(@rv, $u);
|
kill(0, $u{'pid'}) || next;
|
||||||
|
push(@rv, \%u);
|
||||||
}
|
}
|
||||||
return @rv;
|
return @rv;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ else {
|
|||||||
|
|
||||||
# Do it
|
# Do it
|
||||||
$msg = $in{'mode'} eq 'new' ? 'update_pkg2' : 'update_pkg';
|
$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) {
|
if ($config{'update_multiple'} && @pkgs > 1) {
|
||||||
# Update all packages at once
|
# Update all packages at once
|
||||||
@pkgnames = ( );
|
@pkgnames = ( );
|
||||||
|
@ -17,7 +17,7 @@ foreach $a (@todo) {
|
|||||||
# Install packages that are needed
|
# Install packages that are needed
|
||||||
$tellcount = 0;
|
$tellcount = 0;
|
||||||
%already = ( );
|
%already = ( );
|
||||||
&start_update_progress(\@todo);
|
&start_update_progress([ map { $_->{'name'} } @todo ]);
|
||||||
foreach $t (@todo) {
|
foreach $t (@todo) {
|
||||||
next if ($already{$t->{'update'}});
|
next if ($already{$t->{'update'}});
|
||||||
if ($t->{'level'} <= $config{'sched_action'}) {
|
if ($t->{'level'} <= $config{'sched_action'}) {
|
||||||
@ -41,7 +41,7 @@ foreach $t (@todo) {
|
|||||||
$tellcount++;
|
$tellcount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&end_update_progress(\@todo);
|
&end_update_progress();
|
||||||
|
|
||||||
if ($tellcount) {
|
if ($tellcount) {
|
||||||
# Add link to Webmin
|
# Add link to Webmin
|
||||||
|
@ -247,6 +247,12 @@ if ($info->{'disk_fs'} && &show_section('disk')) {
|
|||||||
# Package updates
|
# Package updates
|
||||||
if ($info->{'poss'} && &show_section('poss')) {
|
if ($info->{'poss'} && &show_section('poss')) {
|
||||||
my @poss = @{$info->{'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 @secs = grep { $_->{'security'} } @poss;
|
||||||
my $msg;
|
my $msg;
|
||||||
if (@poss && @secs) {
|
if (@poss && @secs) {
|
||||||
|
Reference in New Issue
Block a user