migration fixes

This commit is contained in:
2026-10-26 15:51:56 -06:00
parent 32ac3828cb
commit e771d305b1
4 changed files with 19 additions and 16 deletions
+1 -8
View File
@@ -3,16 +3,9 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$SCRIPT_DIR/../utils.sh"
PYTHON="$(which python3)"
install_packages python-pipx gnome-shell-extensions
# Install or reinstall gext if missing or broken
if ! ~/.local/bin/gext --version &> /dev/null; then
echo "gext missing or broken, reinstalling..."
pipx uninstall gnome-extensions-cli 2>/dev/null || true
pipx install --python "$PYTHON" gnome-extensions-cli --system-site-packages
fi
ensure_gext
EXTENSIONS=(
"tilingshell@ferrarodomenico.com"
+6 -2
View File
@@ -1,8 +1,12 @@
#!/bin/bash
# Install the Tailscale GNOME extension
source "$HOME/.local/share/coredesktop/utils.sh"
ext="tailscale-gnome@diskmth.fr"
ensure_gext || exit 1
if ! ~/.local/bin/gext list | grep -q "$ext"; then
~/.local/bin/gext --filesystem install "$ext"
~/.local/bin/gext --filesystem enable "$ext"
~/.local/bin/gext --filesystem install "$ext" || exit 1
fi
# Enable even if it was already installed, in case an earlier run stopped short
~/.local/bin/gext --filesystem enable "$ext"
+3 -6
View File
@@ -1,5 +1,7 @@
#!/bin/bash
source "$HOME/.local/share/coredesktop/utils.sh"
is_installed() {
command -v gnome-shell &>/dev/null
}
@@ -7,12 +9,7 @@ is_installed() {
run_update() {
echo "Updating GNOME extensions..."
# Reinstall gext if missing or broken (e.g. its pipx venv went stale after a Python upgrade)
if ! ~/.local/bin/gext --version &> /dev/null; then
echo "gext missing or broken, reinstalling..."
pipx uninstall gnome-extensions-cli 2>/dev/null || true
pipx install --python "$(which python3)" gnome-extensions-cli --system-site-packages
fi
ensure_gext || return 1
# Update every enabled user extension to the latest version for this GNOME Shell.
# The filesystem backend writes directly to ~/.local/share/gnome-shell/extensions;
+9
View File
@@ -41,6 +41,15 @@ install_pipx_apps() {
return $status
}
# Reinstall gext if missing or broken. Its pipx venv goes stale when Arch
# upgrades Python, and migrations run before updates.d/60-pipx.sh rebuilds it.
ensure_gext() {
~/.local/bin/gext --version &> /dev/null && return 0
echo "gext missing or broken, reinstalling..."
pipx uninstall gnome-extensions-cli &> /dev/null || true
pipx install --python "$(which python3)" gnome-extensions-cli --system-site-packages
}
# Function to remove pacman/AUR packages if installed
remove_packages() {
local packages=("$@")