Convert explicit deps to non-explicit on update

Check if dependencies were previously explicitly installed and set them
to implicit so they can be orphaned if no longer required by the new
meta packages which declare dependencies
This commit is contained in:
Makrennel
2024-06-02 02:53:26 +01:00
parent 4f884f5fdc
commit a5a475c4ee
2 changed files with 94 additions and 0 deletions
+15
View File
@@ -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
+79
View File
@@ -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