Fix: Handle deprecated appindicator package on Debian 13+ (#70)
* Fix: Handle deprecated appindicator package on Debian 13+ Fixes #69 The gir1.2-appindicator3-0.1 package was deprecated in Debian 13 (trixie) and replaced with gir1.2-ayatana-appindicator3. This change adds fallback logic to try the new package if the old one is not available. Changes: - install.sh: Try old package first, fall back to ayatana-appindicator - docs/INSTALL.md: Document both package options - src/vocalinux/main.py: Update error message with Debian 13+ note - CONTRIBUTING.md: Update dev setup instructions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: clean up whitespace in filtered package list --------- Co-authored-by: Claude Opus <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
co-authored by
Claude Opus 4.5
parent
8a84b2c97f
commit
68cb35f5b3
+7
-1
@@ -66,8 +66,14 @@ This will:
|
||||
# Ubuntu/Debian
|
||||
sudo apt update
|
||||
sudo apt install -y python3-pip python3-gi python3-gi-cairo \
|
||||
gir1.2-gtk-3.0 gir1.2-appindicator3-0.1 libgirepository1.0-dev \
|
||||
gir1.2-gtk-3.0 libgirepository1.0-dev \
|
||||
python3-dev portaudio19-dev python3-venv xdotool
|
||||
|
||||
# For appindicator (system tray icon):
|
||||
# On older Ubuntu/Debian:
|
||||
sudo apt install -y gir1.2-appindicator3-0.1
|
||||
# On Debian 13+ (trixie) or newer:
|
||||
sudo apt install -y gir1.2-ayatana-appindicator3
|
||||
```
|
||||
|
||||
3. **Set up Python environment:**
|
||||
|
||||
+13
-2
@@ -142,10 +142,16 @@ sudo apt update
|
||||
sudo apt install -y \
|
||||
python3-pip python3-venv python3-dev \
|
||||
python3-gi python3-gi-cairo \
|
||||
gir1.2-gtk-3.0 gir1.2-appindicator3-0.1 \
|
||||
gir1.2-gtk-3.0 \
|
||||
libgirepository1.0-dev portaudio19-dev \
|
||||
wget curl unzip
|
||||
|
||||
# For appindicator (system tray icon):
|
||||
# - On older Ubuntu/Debian versions:
|
||||
sudo apt install -y gir1.2-appindicator3-0.1
|
||||
# - On Debian 13+ (trixie) or newer Ubuntu versions:
|
||||
sudo apt install -y gir1.2-ayatana-appindicator3
|
||||
|
||||
# For X11
|
||||
sudo apt install -y xdotool
|
||||
|
||||
@@ -246,7 +252,12 @@ source venv/bin/activate
|
||||
**Solution:**
|
||||
```bash
|
||||
# Reinstall GTK dependencies
|
||||
sudo apt install python3-gi python3-gi-cairo gir1.2-appindicator3-0.1
|
||||
sudo apt install python3-gi python3-gi-cairo
|
||||
|
||||
# For appindicator (system tray icon) - try one of these:
|
||||
sudo apt install gir1.2-appindicator3-0.1 # For older Debian/Ubuntu
|
||||
# OR
|
||||
sudo apt install gir1.2-ayatana-appindicator3 # For Debian 13+ or newer Ubuntu
|
||||
|
||||
# Recreate venv with system packages
|
||||
rm -rf venv
|
||||
|
||||
+24
-1
@@ -284,7 +284,30 @@ install_system_dependencies() {
|
||||
if [ -n "$MISSING_PACKAGES" ]; then
|
||||
print_info "Installing missing packages:$MISSING_PACKAGES"
|
||||
sudo apt update || { print_error "Failed to update package lists"; exit 1; }
|
||||
sudo apt install -y $MISSING_PACKAGES || { print_error "Failed to install dependencies"; exit 1; }
|
||||
|
||||
# Handle appindicator package: old package was deprecated in Debian 13+
|
||||
# Try the old package first, fall back to ayatana-appindicator if unavailable
|
||||
if echo "$MISSING_PACKAGES" | grep -q "gir1.2-appindicator3-0.1"; then
|
||||
# Remove appindicator from the package list for special handling
|
||||
FILTERED_PACKAGES=$(echo "$MISSING_PACKAGES" | sed 's/gir1.2-appindicator3-0.1//' | xargs)
|
||||
|
||||
# Try to install the old package first (for older Debian/Ubuntu versions)
|
||||
if ! sudo apt install -y gir1.2-appindicator3-0.1 2>/dev/null; then
|
||||
print_info "gir1.2-appindicator3-0.1 not available, trying gir1.2-ayatana-appindicator3..."
|
||||
if ! sudo apt install -y gir1.2-ayatana-appindicator3; then
|
||||
print_error "Failed to install appindicator package (tried both gir1.2-appindicator3-0.1 and gir1.2-ayatana-appindicator3)"
|
||||
exit 1
|
||||
fi
|
||||
print_info "Successfully installed gir1.2-ayatana-appindicator3 (modern replacement)"
|
||||
fi
|
||||
|
||||
# Install remaining packages
|
||||
if [ -n "$FILTERED_PACKAGES" ]; then
|
||||
sudo apt install -y $FILTERED_PACKAGES || { print_error "Failed to install dependencies"; exit 1; }
|
||||
fi
|
||||
else
|
||||
sudo apt install -y $MISSING_PACKAGES || { print_error "Failed to install dependencies"; exit 1; }
|
||||
fi
|
||||
else
|
||||
print_info "All required packages are already installed."
|
||||
fi
|
||||
|
||||
@@ -71,7 +71,8 @@ def check_dependencies():
|
||||
except (ImportError, ValueError):
|
||||
missing_deps.append(
|
||||
"GTK3 and AppIndicator3 (install with: sudo apt install "
|
||||
"python3-gi gir1.2-appindicator3-0.1)"
|
||||
"python3-gi gir1.2-appindicator3-0.1) "
|
||||
"Note: On Debian 13+ use gir1.2-ayatana-appindicator3 instead"
|
||||
)
|
||||
|
||||
if missing_deps:
|
||||
|
||||
Reference in New Issue
Block a user