blob: f0475272e59c9c1de6f81308565bb04aedda6be3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From 2dae27bca96ecd0d03fa7f578a01af57f5c4ce31 Mon Sep 17 00:00:00 2001
From: RayJW <29835902+RayJW@users.noreply.github.com>
Date: Wed, 4 Dec 2024 13:25:43 +0100
Subject: [PATCH] fix: Avoid false positive on unused runtimes for Flatpak with
pinned runtimes
This was due to the way the Flatpak CLI output is parsed, similar to https://github.com/Antiz96/arch-update/issues/103.
Luckily one day the Flatpak CLI output will eventually be [easier to work with](https://github.com/flatpak/flatpak/issues/5499) :eyes:
This commit also replaces `flatpak remove` by `flatpak uninstall`, the former only being an alias for the latter.
Fixes https://github.com/Antiz96/arch-update/issues/285
---
src/lib/orphan_packages.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/orphan_packages.sh b/src/lib/orphan_packages.sh
index 475e1e1..61af669 100755
--- a/src/lib/orphan_packages.sh
+++ b/src/lib/orphan_packages.sh
@@ -7,7 +7,7 @@
orphan_packages=$(pacman -Qtdq)
if [ -n "${flatpak}" ]; then
- flatpak_unused=$(flatpak remove --unused | awk '{print $2}' | grep -v '^$' | sed '$d')
+ flatpak_unused=$(flatpak uninstall --unused | sed -n '/^ 1./,$p' | awk '{print $2}' | grep -v '^$' | sed '$d')
fi
if [ -n "${orphan_packages}" ]; then
@@ -60,7 +60,7 @@ if [ -n "${flatpak}" ]; then
echo
main_msg "$(eval_gettext "Removing Flatpak Unused Packages...")"
- if ! flatpak remove --unused; then
+ if ! flatpak uninstall --unused; then
echo
error_msg "$(eval_gettext "An error has occurred during the removal process\nThe removal has been aborted\n")"
else
|