summaryrefslogtreecommitdiffstats
path: root/files/reprepro/snapshots
diff options
context:
space:
mode:
authorCyril Brulebois <cyril@debamax.com>2016-04-05 18:46:12 +0200
committerCyril Brulebois <cyril@debamax.com>2016-04-05 18:46:12 +0200
commit3002c6aa01d0f46e778cad88438adacec1185143 (patch)
tree6645c64a89d7c2f3da78008fde3b1cf14ca6d4cc /files/reprepro/snapshots
parent7d66dc9cfbdffcc423a164c577e1f061d08f5adb (diff)
Improve reporting for dry-run mode.
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-snapshots14
1 files changed, 9 insertions, 5 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 90a7fe6..159cfde 100755
--- a/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots
+++ b/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots
@@ -108,11 +108,15 @@ foreach my $dir (@snapshots_dirs) {
# something to delete:
my $db_id = "s=$suite=$timestamp";
if (grep { $db_id eq $_ } @reprepro_references) {
- verbose_print(" $db_id found in the db, forgetting\n");
- run("reprepro $reprepro_options _removereferences $db_id")
- if ! $dryrun;
- $removed++;
- verbose_print(" done\n");
+ if ($dryrun) {
+ verbose_print(" should be forgetting: $db_id\n");
+ }
+ else {
+ verbose_print(" forgetting: $db_id\n");
+ run("reprepro $reprepro_options _removereferences $db_id");
+ $removed++;
+ verbose_print(" forgotten: $db_id\n");
+ }
}
# Let's remove the snapshot entirely: