Skip to content

Commit

Permalink
Merge pull request #550 from cpanel/RE-952
Browse files Browse the repository at this point in the history
Add 'sys-snap' to the list of packages that PackageRestore handles
  • Loading branch information
cPholloway authored Nov 18, 2024
2 parents f938c04 + 10d914f commit e9f87eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions elevate-cpanel
Original file line number Diff line number Diff line change
Expand Up @@ -4354,6 +4354,7 @@ EOS
sub _get_packages_to_check () {
return qw{
net-snmp
sys-snap
};
}

Expand All @@ -4368,6 +4369,8 @@ EOS
}
}

Elevate::PkgMgr::remove(@installed_packages);

my $config_files = Elevate::PkgMgr::get_config_files( \@installed_packages );

Elevate::StageFile::update_stage_file(
Expand Down
3 changes: 3 additions & 0 deletions lib/Elevate/Components/PackageRestore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use parent qw{Elevate::Components::Base};
sub _get_packages_to_check () {
return qw{
net-snmp
sys-snap
};
}

Expand All @@ -49,6 +50,8 @@ sub pre_distro_upgrade ($self) {
}
}

Elevate::PkgMgr::remove(@installed_packages);

my $config_files = Elevate::PkgMgr::get_config_files( \@installed_packages );

Elevate::StageFile::update_stage_file(
Expand Down
1 change: 1 addition & 0 deletions t/components-PackageRestore.t
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ my $pkg_restore = cpev->new->get_component('PackageRestore');
$pkgs_checked_for_config_files = $_[1];
return \%config_files;
},
remove => 1,
);

my $mock_upsf = Test::MockModule->new('Elevate::StageFile');
Expand Down

0 comments on commit e9f87eb

Please sign in to comment.