summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-04-30 17:40:29 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-04-30 17:40:29 (EDT)
commit9776023fc9890863ddd6b54c53c7c40001a351d3 (patch)
tree24592fdf74026f02dacc1d341114901e0a712560
parentc619a5b3005cb33b912371a7bdc2ddfb7e2354e1 (diff)
lib/garbage.sh: Add some verbose output.
-rw-r--r--lib/garbage.sh7
-rw-r--r--locale/en_US/pro_archman.sh5
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/garbage.sh b/lib/garbage.sh
index 9f3bd33..3a0ca97 100644
--- a/lib/garbage.sh
+++ b/lib/garbage.sh
@@ -20,6 +20,8 @@
[ "x${_GARBAGE_SM+set}" = 'xset' ] && return 0
_GARBAGE_SM=1
+use locale
+use output
use dir
collect_garbage()
@@ -30,6 +32,8 @@ collect_garbage()
local dirs=
local file=
+ info_v "$(get_msg 'collecting_garbage')"
+
# NB: The %s format conversion specifier is not specified by POSIX, but
# it is supported by the GNU and BusyBox implementations of date.
cur_time=$(date '+%s')
@@ -43,6 +47,7 @@ collect_garbage()
break
fi
while read -r dirs file; do
+ info_v "$(get_msg 'collecting_garbage_file')" "${file}"
rm -f "${base_dir}/${file}"
while [ ${dirs} -gt 0 ]; do
file="${file%/*}"
@@ -61,6 +66,8 @@ mark_pool_garbage()
local file="${1}"
local time=
+ info_v "$(get_msg 'marking_garbage_file')" "${file}"
+
# NB: The %s format conversion specifier is not specified by POSIX, but
# it is supported by the GNU and BusyBox implementations of date.
time=$(date '+%s')
diff --git a/locale/en_US/pro_archman.sh b/locale/en_US/pro_archman.sh
index 64e941f..a6351ef 100644
--- a/locale/en_US/pro_archman.sh
+++ b/locale/en_US/pro_archman.sh
@@ -93,3 +93,8 @@ msg_pro_archman_control_missing_fields='missing fields: %s'
msg_pro_archman_feed_adding='Adding package %s to feed %s/%s/%s/%s/%s...'
msg_pro_archman_feed_removing='Removing package %s to feed %s/%s/%s/%s/%s...'
msg_pro_archman_updating_feeds='Updating feeds...'
+
+# lib/garbage.sh
+msg_pro_archman_collecting_garbage='Collecting garbage...'
+msg_pro_archman_collecting_garbage_file='Deleting file %s...'
+msg_pro_archman_marking_garbage_file='Marking file %s for future deletion...'