diff --git a/migrations/1793990879.sh b/migrations/1793990879.sh new file mode 100644 index 0000000..e0e07b0 --- /dev/null +++ b/migrations/1793990879.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# CoreDesktop installed libayatana-appindicator for building cline-desktop, +# which cline-desktop-bin has since replaced. Remove it once, unless something +# else needs it: then leave it to go with that, as an orphan. +pkg=libayatana-appindicator + +# The exact name: pacman -Q also matches a package that only provides it +[ "$(pacman -Qq "$pkg" 2> /dev/null)" = "$pkg" ] || exit 0 + +if [ "$(LC_ALL=C pacman -Qi "$pkg" | awk -F' *: *' '/^Required By/ { print $2 }')" != "None" ]; then + sudo pacman -D --asdeps "$pkg" > /dev/null + exit +fi + +echo "Removing $pkg..." +sudo pacman -Rns --noconfirm "$pkg"