diff --git a/elevate-cpanel b/elevate-cpanel index 5195ce67..1f16e227 100755 --- a/elevate-cpanel +++ b/elevate-cpanel @@ -3073,6 +3073,12 @@ EOS : $repos->{'jetapps-beta'} ? 'jetapps-beta' : 'jetapps-stable'; # Just give up and choose stable if you can't guess. INFO("Jetbackup tier '$jetbackup_tier' detected. Not removing jetbackup. Will re-install it after elevate."); + if ( ref Elevate::PkgMgr::instance() eq 'Elevate::PkgMgr::APT' ) { + + if ( -f "/etc/apt/sources.list.d/$jetbackup_tier.disabled" ) { + rename( "/etc/apt/sources.list.d/$jetbackup_tier.disabled", "/etc/apt/sources.list.d/$jetbackup_tier" ) || WARN("Couldn't enable repository for $jetbackup_tier: $!"); + } + } my @reinstall = Elevate::PkgMgr::get_installed_pkgs_in_repo(qw/jetapps jetapps-stable jetapps-beta jetapps-edge/); unshift @reinstall, $jetbackup_tier; diff --git a/lib/Elevate/Components/JetBackup.pm b/lib/Elevate/Components/JetBackup.pm index 311d2aa4..e64c336d 100644 --- a/lib/Elevate/Components/JetBackup.pm +++ b/lib/Elevate/Components/JetBackup.pm @@ -48,6 +48,13 @@ sub pre_distro_upgrade ($self) { : $repos->{'jetapps-beta'} ? 'jetapps-beta' : 'jetapps-stable'; # Just give up and choose stable if you can't guess. INFO("Jetbackup tier '$jetbackup_tier' detected. Not removing jetbackup. Will re-install it after elevate."); + if ( ref Elevate::PkgMgr::instance() eq 'Elevate::PkgMgr::APT' ) { + + # We need to enable that repo if possible and run apt update so that we can fetch the pkglist for it + if ( -f "/etc/apt/sources.list.d/$jetbackup_tier.disabled" ) { + rename( "/etc/apt/sources.list.d/$jetbackup_tier.disabled", "/etc/apt/sources.list.d/$jetbackup_tier" ) || WARN("Couldn't enable repository for $jetbackup_tier: $!"); + } + } my @reinstall = Elevate::PkgMgr::get_installed_pkgs_in_repo(qw/jetapps jetapps-stable jetapps-beta jetapps-edge/); unshift @reinstall, $jetbackup_tier;