Revert "Use APT with local package repository for better dependency resolution"

This reverts commit 9a0a734c58db43722387c34885e98277a179cb3d.
This commit is contained in:
Don Williams 2025-12-13 06:23:52 -05:00
parent 9a0a734c58
commit fea0dbbefc

View File

@ -180,30 +180,14 @@ install_from_packages() {
echo "${CAT} Removing existing Hyprland installations to avoid conflicts..." | tee -a "$LOG" echo "${CAT} Removing existing Hyprland installations to avoid conflicts..." | tee -a "$LOG"
clean_existing_hyprland clean_existing_hyprland
# Create a local package repository (Packages.gz index) # Update package cache after cleanup
echo "${INFO} Creating local package repository..." | tee -a "$LOG" echo "${INFO} Updating package cache..." | tee -a "$LOG"
if command -v dpkg-scanpackages >/dev/null; then sudo apt-get update 2>&1 | tail -3 | tee -a "$LOG"
cd "$DEB_PACKAGES_SOURCE" || return 1
sudo dpkg-scanpackages -m . /dev/null > Packages 2>/dev/null || true
gzip -c Packages > Packages.gz 2>/dev/null || true
cd - >/dev/null || return 1
# Add local repository to APT sources
echo "${INFO} Configuring APT to use local package repository..." | tee -a "$LOG"
sudo tee /etc/apt/sources.list.d/local-hyprland.list >/dev/null <<< "deb [trusted=yes] file://$DEB_PACKAGES_SOURCE ./"
# Update package cache with local repository
echo "${INFO} Updating package cache (including local repository)..." | tee -a "$LOG"
sudo apt-get update 2>&1 | tail -5 | tee -a "$LOG"
else
echo "${WARN} dpkg-scanpackages not available. Using direct dpkg installation." | tee -a "$LOG"
fi
# Install core packages only (skip plugins and debug symbols) # Install core packages only (skip plugins and debug symbols)
echo "${INFO} Installing core Hyprland packages (excluding plugins and debug symbols)..." | tee -a "$LOG" echo "${INFO} Installing core Hyprland packages (excluding plugins and debug symbols)..." | tee -a "$LOG"
# Build list of packages to install (excluding dbgsym and plugins) # Install only essential packages, skip plugins and dbgsym
local packages_to_install=()
for deb in "$DEB_PACKAGES_SOURCE"/*.deb; do for deb in "$DEB_PACKAGES_SOURCE"/*.deb; do
filename=$(basename "$deb") filename=$(basename "$deb")
@ -215,23 +199,13 @@ install_from_packages() {
continue continue
fi fi
# Extract package name from filename echo "${INFO} Installing: $filename" | tee -a "$LOG"
pkg_name=$(echo "$filename" | sed 's/_.*//g') sudo dpkg -i "$deb" 2>&1 | tee -a "$LOG" || true
packages_to_install+=("$pkg_name")
done done
if [ ${#packages_to_install[@]} -gt 0 ]; then # Fix any dependency issues
echo "${INFO} Installing ${#packages_to_install[@]} packages with dependency resolution..." | tee -a "$LOG" echo "${INFO} Fixing any dependency issues..." | tee -a "$LOG"
sudo apt-get install -y "${packages_to_install[@]}" 2>&1 | tail -20 | tee -a "$LOG" sudo apt-get install -f -y 2>&1 | tail -5 | tee -a "$LOG"
else
echo "${WARN} No packages to install after filtering" | tee -a "$LOG"
return 1
fi
# Clean up APT sources
echo "${INFO} Cleaning up temporary APT configuration..." | tee -a "$LOG"
sudo rm -f /etc/apt/sources.list.d/local-hyprland.list
sudo apt-get update 2>&1 | tail -1 | tee -a "$LOG"
echo "${OK} Core package installation completed!" | tee -a "$LOG" echo "${OK} Core package installation completed!" | tee -a "$LOG"
echo "${NOTE} To install plugins, run: sudo dpkg -i $DEB_PACKAGES_SOURCE/hyprland-plugin-*.deb" | tee -a "$LOG" echo "${NOTE} To install plugins, run: sudo dpkg -i $DEB_PACKAGES_SOURCE/hyprland-plugin-*.deb" | tee -a "$LOG"