Skip to content

Commit

Permalink
Merge pull request #542 from cpanel/RE-934
Browse files Browse the repository at this point in the history
Ensure final dnf update is executed
  • Loading branch information
toddr authored Nov 4, 2024
2 parents be0b30c + 37f910d commit 6c90667
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
17 changes: 10 additions & 7 deletions elevate-cpanel
Original file line number Diff line number Diff line change
Expand Up @@ -6717,8 +6717,8 @@ EOS
return instance()->update_with_options( $options, $pkgs );
}

sub update_allow_erasing (@args) {
return instance()->update_allow_erasing(@args);
sub update_allow_erasing (@additional_args) {
return instance()->update_allow_erasing(@additional_args);
}

sub makecache () {
Expand Down Expand Up @@ -6893,7 +6893,7 @@ EOS
die "update_with_options unimplemented";
}

sub update_allow_erasing ( $self, @args ) {
sub update_allow_erasing ( $self, @additional_args ) {
die "update_allow_erasing unimplemented";
}

Expand Down Expand Up @@ -7153,13 +7153,16 @@ EOS
return;
}

sub update_allow_erasing ( $self, @args ) {
sub update_allow_erasing ( $self, @additional_args ) {
my $pkgmgr = $self->_pkgmgr();

my @additional_args = scalar @args ? @args : '';

$self->ssystem( $pkgmgr, '-y', '--allowerasing', @additional_args, 'update' );
my @args = (
'-y',
'--allowerasing',
);

push @args, @additional_args;
$self->ssystem_and_die( $pkgmgr, @args, 'update' );
return;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Elevate/PkgMgr.pm
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ sub update_with_options ( $options, $pkgs ) {
return instance()->update_with_options( $options, $pkgs );
}

sub update_allow_erasing (@args) {
return instance()->update_allow_erasing(@args);
sub update_allow_erasing (@additional_args) {
return instance()->update_allow_erasing(@additional_args);
}

sub makecache () {
Expand Down
2 changes: 1 addition & 1 deletion lib/Elevate/PkgMgr/Base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ sub update_with_options ( $self, $options, $pkgs ) {
die "update_with_options unimplemented";
}

sub update_allow_erasing ( $self, @args ) {
sub update_allow_erasing ( $self, @additional_args ) {
die "update_allow_erasing unimplemented";
}

Expand Down
11 changes: 7 additions & 4 deletions lib/Elevate/PkgMgr/YUM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,16 @@ sub update_with_options ( $self, $options, $pkgs ) {
return;
}

sub update_allow_erasing ( $self, @args ) {
sub update_allow_erasing ( $self, @additional_args ) {
my $pkgmgr = $self->_pkgmgr();

my @additional_args = scalar @args ? @args : '';

$self->ssystem( $pkgmgr, '-y', '--allowerasing', @additional_args, 'update' );
my @args = (
'-y',
'--allowerasing',
);

push @args, @additional_args;
$self->ssystem_and_die( $pkgmgr, @args, 'update' );
return;
}

Expand Down

0 comments on commit 6c90667

Please sign in to comment.