diff --git a/install.sh b/install.sh index 84ce15ef8..c1d3f9c10 100755 --- a/install.sh +++ b/install.sh @@ -92,6 +92,21 @@ if (( ${#pkglist[@]} != 0 )); then fi fi +# Convert old dependencies to non explicit dependencies so that they can be orphaned if not in meta packages +remove_bashcomments_emptylines ./scriptdata/previous_dependencies.conf ./cache/old_deps_stripped.conf +readarray -t old_deps_list < ./cache/old_deps_stripped.conf +pacman -Qeq > ./cache/pacman_explicit_packages +readarray -t explicitly_installed < ./cache/pacman_explicit_packages +[ "$ask" = "true" ] && read -p "Attempt to set previously explicitly installed deps as implicit [Y/n]? " convert_explicit +convert_explicit=${convert_explicit:-y} + +if [ "$convert_explicit" != "${convert_explicit#[Yy]}" ]; then + echo "Attempting to set previously explicitly installed deps as implicit..." + for i in "${explicitly_installed[@]}"; do for j in "${old_deps_list[@]}"; do + [ "$i" = "$j" ] && $AUR_HELPER -D --asdeps "$i" + done; done +fi + # Install core dependencies from the meta-packages metapkgs=(arch-packages/illogical-impulse-{audio,backlight,basic,fonts-themes,gnome,gtk,microtex,portal,python,screencapture,widgets}) if $ask; then diff --git a/scriptdata/previous_dependencies.conf b/scriptdata/previous_dependencies.conf new file mode 100644 index 000000000..a773fdd92 --- /dev/null +++ b/scriptdata/previous_dependencies.conf @@ -0,0 +1,79 @@ +### This file contains a list of dependencies which were previously explicitly installed that are now installed using meta packages +### Must be one package per line as it needs to be compared against the explicitly installed list from pacman +axel +bc +coreutils +cliphist +cmake +curl +fuzzel +rsync +wget +ripgrep +gojq +npm +meson +typescript +gjs +xdg-user-dirs +tinyxml2 +gtkmm3 +gtksourceviewmm +cairomm +python-build +python-pillow +python-pywal +python-setuptools-scm +python-wheel +xdg-desktop-portal +xdg-desktop-portal-gtk +xdg-desktop-portal-hyprland-git +pavucontrol +wireplumber +libdbusmenu-gtk3 +playerctl +swww +webp-pixbuf-loader +gtk-layer-shell +gtk3 +gtksourceview3 +gobject-introspection +upower +yad +ydotool +xdg-user-dirs-gtk +polkit-gnome +gnome-keyring +gnome-control-center +blueberry +networkmanager +gammastep +gnome-bluetooth-3.0 +brightnessctl +ddcutil +dart-sass +python-pywayland +python-psutil +hypridle-git +hyprlock-git +wlogout +wl-clipboard +hyprpicker-git +anyrun-git +adw-gtk3-git +qt5ct +qt5-wayland +fontconfig +ttf-readex-pro +ttf-jetbrains-mono-nerd +ttf-material-symbols-variable-git +ttf-space-mono-nerd +fish +foot +starship +swappy +wf-recorder +grim +tesseract +tesseract-data-eng +slurp