Disable package manager installation for Borg CLI to ensure the latest version is always installed from GitHub releases

This commit is contained in:
kdusek
2025-11-13 17:59:47 +01:00
parent 4f27a626a6
commit e7e64f6838

View File

@@ -329,75 +329,9 @@ determine_install_strategy() {
# Function to install Borg CLI from package manager
install_borg_from_package_manager() {
# Package manager installation only works for system-wide installation
if [[ "$INSTALL_STRATEGY" == user* ]]; then
print_status "Skipping package manager for user installation"
return 1
fi
print_status "Attempting to install Borg CLI from package manager..."
case $PKG_MANAGER in
apt)
# Check if Borg CLI is available in official repositories
if apt-cache show borgbackup 2>/dev/null | grep -q "borg"; then
print_status "Installing Borg CLI from Ubuntu/Debian repositories..."
sudo apt install -y borgbackup
return 0
else
print_warning "Borg CLI not available in Ubuntu/Debian repositories"
return 1
fi
;;
yum)
# Check if Borg CLI is available
if yum list available borgbackup 2>/dev/null | grep -q borgbackup; then
print_status "Installing Borg CLI from yum repositories..."
sudo yum install -y borgbackup
return 0
else
print_warning "Borg CLI not available in yum repositories"
return 1
fi
;;
dnf)
# Check if Borg CLI is available
if dnf list available borgbackup 2>/dev/null | grep -q borgbackup; then
print_status "Installing Borg CLI from dnf repositories..."
sudo dnf install -y borgbackup
return 0
else
print_warning "Borg CLI not available in dnf repositories"
return 1
fi
;;
pacman)
# Borg is available in Arch repositories
if pacman -Si borg 2>/dev/null | grep -q borg; then
print_status "Installing Borg CLI from pacman repositories..."
sudo pacman -S --noconfirm borg
return 0
else
print_warning "Borg CLI not available in pacman repositories"
return 1
fi
;;
zypper)
# Check if Borg CLI is available
if zypper search -x borgbackup 2>/dev/null | grep -q borgbackup; then
print_status "Installing Borg CLI from zypper repositories..."
sudo zypper install -y borgbackup
return 0
else
print_warning "Borg CLI not available in zypper repositories"
return 1
fi
;;
*)
print_warning "Package manager $PKG_MANAGER not supported for automatic installation"
return 1
;;
esac
# Package manager versions are often outdated, use binary from GitHub instead
print_warning "Package manager installation skipped for Borg CLI to ensure latest version, using binary instead"
return 1
}
# Function to install Borg CLI from binary