summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-09-22 04:33:59 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-09-22 04:33:59 -0300
commitbdc72cb35e90e0d2e795a928de658c9d71b0feac (patch)
treecfdb0308188c1b33a859a642f522b3531b9ff415
parent02099c8d855fc8a77075409f96e097ce9aa09af6 (diff)
Clarifications
-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) \