diff --git a/elevate-cpanel b/elevate-cpanel index db38b62e..7f2d297b 100755 --- a/elevate-cpanel +++ b/elevate-cpanel @@ -4354,6 +4354,7 @@ EOS sub _get_packages_to_check () { return qw{ net-snmp + sys-snap }; } @@ -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( diff --git a/lib/Elevate/Components/PackageRestore.pm b/lib/Elevate/Components/PackageRestore.pm index 6aaa72a1..c0761b21 100644 --- a/lib/Elevate/Components/PackageRestore.pm +++ b/lib/Elevate/Components/PackageRestore.pm @@ -35,6 +35,7 @@ use parent qw{Elevate::Components::Base}; sub _get_packages_to_check () { return qw{ net-snmp + sys-snap }; } @@ -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( diff --git a/t/components-PackageRestore.t b/t/components-PackageRestore.t index 4fdf22ba..a41772c6 100644 --- a/t/components-PackageRestore.t +++ b/t/components-PackageRestore.t @@ -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');