summaryrefslogtreecommitdiff
path: root/clean-pacman
diff options
context:
space:
mode:
Diffstat (limited to 'clean-pacman')
-rwxr-xr-xclean-pacman10
1 files changed, 8 insertions, 2 deletions
diff --git a/clean-pacman b/clean-pacman
index 96de5b1..6b34874 100755
--- a/clean-pacman
+++ b/clean-pacman
@@ -23,18 +23,24 @@ flags=($(echo "$@" | grep -o "\-\-no\(confirm\|progressbar\)" || true))
args="$@"
case $cmd in
-# Collect the packages that are going to be installed, but use a clean database to
-# get the full needed list
+
+# Collect the packages that are going to be installed, but use a clean database
+# to get the full needed list.
# See update-cleansystem
-T)
# Use sudo because $0 is run as normal user
+# TODO -Sy only once
sudo pacman -b "${BD:-/var/lib/libretools/clean}" -Sy
sudo pacman -b "${BD:-/var/lib/libretools/clean}" \
-Sp \
--print-format "%n" \
${args[@]} >>${cleanup_log}
;;
+
# Diff against previously installed packages and remove the unneeded ones
+#
+# We don't collect during -S because we never get here if depencies are met
+# during -T
-S)
cleanup=($(comm -23 \
<(pacman -Qq | sort) \