summaryrefslogtreecommitdiffstats
path: root/files/reprepro/snapshots
diff options
context:
space:
mode:
authorCyril Brulebois <cyril@debamax.com>2016-04-05 19:13:17 +0200
committerCyril Brulebois <cyril@debamax.com>2016-04-05 19:47:08 +0200
commitf63f1245643392ec68c0d26b1d0ca80b8da3523b (patch)
treec45b3f31a002e269aacc3fe8fa422afcfa87191b /files/reprepro/snapshots
parent025b7d154d3cf571d503eea68187f9ace7b534d4 (diff)
Improve reporting again.
Improve readability when mentioning the expiration status. Also, make sure to get to the "deleteunreferenced" stage when working in dry-run mode. Finally, mention the amount of (maybe-)removed references, for both dry-run and real modes. Signed-off-by: Cyril Brulebois <cyril@debamax.com>
Diffstat (limited to 'files/reprepro/snapshots')
-rwxr-xr-xfiles/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots7
1 files changed, 4 insertions, 3 deletions
diff --git a/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots b/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots
index 9f2b9c1..ca822ec 100755
--- a/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots
+++ b/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots
@@ -102,7 +102,7 @@ foreach my $dir (@snapshots_dirs) {
verbose_print(" - $snapshot is valid until $valid_until\n");
my $date = DateTime::Format::Mail->parse_datetime($valid_until);
if (DateTime->compare($now, $date) > 0) {
- verbose_print(" -> expiration time reached\n");
+ verbose_print(" expiration time reached\n");
# Let's look at the references in reprepro to see if there's
# something to delete:
@@ -110,6 +110,7 @@ foreach my $dir (@snapshots_dirs) {
if (grep { $db_id eq $_ } @reprepro_references) {
if ($dryrun) {
verbose_print(" should be forgetting: $db_id\n");
+ $removed++;
}
else {
verbose_print(" forgetting: $db_id\n");
@@ -124,13 +125,13 @@ foreach my $dir (@snapshots_dirs) {
if ! $dryrun;
}
else {
- verbose_print(" -> nothing to do\n");
+ verbose_print(" nothing to do\n");
}
}
}
if ($removed > 0) {
- verbose_print("at least one snapshot was removed\n");
+ verbose_print("at least one snapshot was removed (total: $removed)\n");
if ($dryrun) {
verbose_print("should be running: reprepro deleteunreferenced\n");
}