From a2bdd8fb4c70d39dc84cde35bb86b1aa19697da2 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Thu, 31 Oct 2024 19:11:24 +0100 Subject: [PATCH] fix(waydroid-setup): not installing `dkms` on arch (#881) took some code from #797 Co-authored-by: JEEVITHA KANNAN K S --- core/tabs/applications-setup/waydroid-setup.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/tabs/applications-setup/waydroid-setup.sh b/core/tabs/applications-setup/waydroid-setup.sh index 255a4cbe..8cac399f 100755 --- a/core/tabs/applications-setup/waydroid-setup.sh +++ b/core/tabs/applications-setup/waydroid-setup.sh @@ -15,10 +15,17 @@ installWaydroid() { case "$PACKAGER" in pacman) "$AUR_HELPER" -S --needed --noconfirm waydroid - if command_exists dkms; then - "$AUR_HELPER" -S --needed --noconfirm binder_linux-dkms - "$ESCALATION_TOOL" modprobe binder-linux device=binder,hwbinder,vndbinder + if ! command_exists dkms; then + installed_kernels=$("$PACKAGER" -Q | grep -E '^linux(| |-rt|-rt-lts|-hardened|-zen|-lts)[^-headers]' | cut -d ' ' -f 1) + for kernel in $installed_kernels; do + header="${kernel}-headers" + printf "%b\n" "${CYAN}Installing headers for $kernel...${RC}" + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$header" + done + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm dkms fi + "$AUR_HELPER" -S --needed --noconfirm binder_linux-dkms + "$ESCALATION_TOOL" modprobe binder-linux device=binder,hwbinder,vndbinder ;; apt-get|nala) curl https://repo.waydro.id | "$ESCALATION_TOOL" sh