From 05d869ef7491dc034d371bc12b5c1508936d481f Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Thu, 3 Oct 2024 00:05:31 +0200 Subject: [PATCH 1/3] fix: pacman orphan package removal --- core/tabs/system-setup/system-cleanup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/tabs/system-setup/system-cleanup.sh b/core/tabs/system-setup/system-cleanup.sh index 198a9d68..3d376ba5 100644 --- a/core/tabs/system-setup/system-cleanup.sh +++ b/core/tabs/system-setup/system-cleanup.sh @@ -23,7 +23,8 @@ cleanup_system() { ;; pacman) "$ESCALATION_TOOL" "$PACKAGER" -Sc --noconfirm - "$ESCALATION_TOOL" "$PACKAGER" -Rns "$(pacman -Qtdq)" --noconfirm + # -Rns will return 1 if there are no packages provided + "$PACKAGER" -Qtdq | "$ESCALATION_TOOL" "$PACKAGER" -Rns --noconfirm -- &> /dev/null 2>&1 || true ;; *) printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" From a911fe1c168daff791b9a61d4e261ce423bd2988 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Thu, 3 Oct 2024 00:14:06 +0200 Subject: [PATCH 2/3] missclick :( --- core/tabs/system-setup/system-cleanup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tabs/system-setup/system-cleanup.sh b/core/tabs/system-setup/system-cleanup.sh index 3d376ba5..cc14d0a4 100644 --- a/core/tabs/system-setup/system-cleanup.sh +++ b/core/tabs/system-setup/system-cleanup.sh @@ -24,7 +24,7 @@ cleanup_system() { pacman) "$ESCALATION_TOOL" "$PACKAGER" -Sc --noconfirm # -Rns will return 1 if there are no packages provided - "$PACKAGER" -Qtdq | "$ESCALATION_TOOL" "$PACKAGER" -Rns --noconfirm -- &> /dev/null 2>&1 || true + "$PACKAGER" -Qtdq | "$ESCALATION_TOOL" "$PACKAGER" -Rns --noconfirm - > /dev/null 2>&1 || true ;; *) printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" From 2f4f703fe666add40b5f84db8a501fc95bd755e1 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Thu, 3 Oct 2024 12:13:46 +0200 Subject: [PATCH 3/3] suggestions by @nnyyxxxx Co-authored-by: nyx --- core/tabs/system-setup/system-cleanup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/tabs/system-setup/system-cleanup.sh b/core/tabs/system-setup/system-cleanup.sh index cc14d0a4..0a625913 100644 --- a/core/tabs/system-setup/system-cleanup.sh +++ b/core/tabs/system-setup/system-cleanup.sh @@ -23,8 +23,7 @@ cleanup_system() { ;; pacman) "$ESCALATION_TOOL" "$PACKAGER" -Sc --noconfirm - # -Rns will return 1 if there are no packages provided - "$PACKAGER" -Qtdq | "$ESCALATION_TOOL" "$PACKAGER" -Rns --noconfirm - > /dev/null 2>&1 || true + "$ESCALATION_TOOL" "$PACKAGER" -Rns $(pacman -Qtdq) --noconfirm > /dev/null 2>&1 ;; *) printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"