From a6f026c65a762725518c9a484b8cfd0eaf43abe5 Mon Sep 17 00:00:00 2001 From: Joaquin Date: Sun, 16 Apr 2023 16:15:25 +0300 Subject: [PATCH] [bug fix] Fix optdeps not installed Fixed Optional Dependencies being downloaded but not installed on the system and also the exit menu of the install script --- install | 8 ++------ koffe | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/install b/install index bb8919a..cb419a1 100755 --- a/install +++ b/install @@ -48,11 +48,7 @@ cp pi.is /mnt/root/ echo 'bash /root/pi.is' > /mnt/root/.bashrc echo 'echo "" > /root/.bashrc' >> /mnt/root/.bashrc arch-chroot /mnt -whiptail --clear --backtitle "Koffe Offline Arch Installer - made by Konicks(GRI)" --title "Goodbye screen" --msgbox "Well, that was everything. Use reboot or poweroff to exit" 0 0 umount -a -if (whiptail --title "Koffe Finished" --yesno "Installation Finished, do you want to reboot?" 8 78); then - reboot -else - exit -fi +ersp=$(whiptail --title "Installation Finished" --menu "Installation Finished. Do you want to exit to terminal OR poweroff and boot into arch?" 19 74 10 "exit" "and enter a terminal" "poweroff" "and boot into arch" 3>&1 1>&2 2>&3 3>&-) +$ersp diff --git a/koffe b/koffe index 063c549..ccec3a5 100755 --- a/koffe +++ b/koffe @@ -121,6 +121,13 @@ then $pactree_command $app > /tmp/koffe/n/$app pacman -Spdd --noconfirm - < /tmp/koffe/n/$app > /tmp/koffe/l/$app echo $app >> /tmp/koffe/rootfs/airootfs/root/install.list + if [[ $optdep == 1 ]]; + then + #ADD OPTIONAL DEPS TO INSTALL LIST + pactree -suo $app > /tmp/koffe/with_opt + pactree -su $app > /tmp/koffe/wout_opt + grep -Fxvf /tmp/koffe/wout_opt /tmp/koffe/with_opt >> /tmp/koffe/rootfs/airootfs/root/install.list + fi wget -nc -i /tmp/koffe/l/$app -P /tmp/koffe/rootfs/airootfs/root/pkg/ fi @@ -140,6 +147,14 @@ then do $pactree_command $component >> /tmp/koffe/grtree echo $component >> /tmp/koffe/rootfs/airootfs/root/install.list + if [[ $optdep == 1 ]]; + then + #ADD OPTIONAL DEPS TO INSTALL LIST + pactree -suo $component > /tmp/koffe/with_opt + pactree -su $component > /tmp/koffe/wout_opt + grep -Fxvf /tmp/koffe/wout_opt /tmp/koffe/with_opt >> /tmp/koffe/rootfs/airootfs/root/install.list + fi + done pacman -Spdd --noconfirm - < /tmp/koffe/grtree > /tmp/koffe/grlinks wget -nc -i /tmp/koffe/grlinks -P /tmp/koffe/rootfs/airootfs/root/pkg/ @@ -161,7 +176,7 @@ then if [[ $aurdep_aur != "error" ]]; then - $pactree_command $depend > /tmp/koffe/n/$depend + pactree -su $depend > /tmp/koffe/n/$depend pacman -Spdd --noconfirm - < /tmp/koffe/n/$depend > /tmp/koffe/l/$depend wget -nc -i /tmp/koffe/l/$depend -P /tmp/koffe/rootfs/airootfs/root/pkg/ fi