Skip to content

Commit

Permalink
Add 'sys-snap' to the list of packages that PackageRestore handles
Browse files Browse the repository at this point in the history
Case RE-952: This adds 'sys-snap' to the list of packages that the
PackageRestore component handles.  It also now explicitely removes the
packages as it was previously relying on leapp to implicitely remove
them.

Changelog: Add 'sys-snap' to the list of packages that the
 PackageRestore component handles
  • Loading branch information
Travis Holloway committed Nov 15, 2024
1 parent f938c04 commit 10d914f
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 10d914f

Please sign in to comment.