From bdc72cb35e90e0d2e795a928de658c9d71b0feac Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Sat, 22 Sep 2012 04:33:59 -0300 Subject: Clarifications --- clean-pacman | 10 ++++++++-- 1 file 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) \ -- cgit v1.2.3-54-g00ecf