Fix to also set UCF_FORCE_CONFFOLD variable

https://github.com/virtualmin/virtualmin-gpl/issues/612
This commit is contained in:
Ilia Ross
2023-08-16 15:12:18 +03:00
parent 5156a472be
commit dd1b4bc77b
2 changed files with 3 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ local $force = !$_[2];
local (@rv, @newpacks);
# Build the command to run
$ENV{'UCF_FORCE_CONFFOLD'} = 'YES';
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
local $uicmd = "$apt_get_command -y ".($force ? " -f" : "")." install $update";
$update = join(" ", map { quotemeta($_) } split(/\s+/, $update));
@@ -75,6 +76,7 @@ return @rv;
sub update_system_operations
{
my ($packages) = @_;
$ENV{'UCF_FORCE_CONFFOLD'} = 'YES';
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
my $cmd = "apt-get -s install ".
join(" ", map { quotemeta($_) } split(/\s+/, $packages)).

View File

@@ -202,6 +202,7 @@ local $args = ($in->{'depends'} ? " --force-depends" : "").
($in->{'overwrite'} ? " --force-overwrite" : "").
($in->{'downgrade'} ? " --force-downgrade" : "");
local $qm = quotemeta($_[0]);
$ENV{'UCF_FORCE_CONFFOLD'} = 'YES';
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
local $out = &backquote_logged("dpkg --install $args $qm 2>&1 </dev/null");
if ($?) {