From: Jonathan Lebon Date: Sat, 27 May 2023 14:35:12 +0000 (-0400) Subject: lib/deploy: Log case when auto-pruning is hopeless X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2~1^2~33^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a3c0d6a3fee7958ebfb6f8bc3c70f053be5c3085;p=ostree.git lib/deploy: Log case when auto-pruning is hopeless For easier diagnostics. --- diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index fbaf83c5..7de6fdf3 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -2578,6 +2578,7 @@ auto_early_prune_old_deployments (OstreeSysroot *self, GPtrArray *new_deployment { /* Even if we auto-pruned, the new bootdirs wouldn't fit. Just let the * code continue and let it hit ENOSPC. */ + g_printerr ("Disabling auto-prune optimization; insufficient space left in bootfs\n"); return TRUE; } diff --git a/tests/kolainst/destructive/auto-prune.sh b/tests/kolainst/destructive/auto-prune.sh index 597da5a0..ffe86669 100755 --- a/tests/kolainst/destructive/auto-prune.sh +++ b/tests/kolainst/destructive/auto-prune.sh @@ -46,6 +46,7 @@ rpm-ostree rebase :modkernel1 if OSTREE_SYSROOT_OPTS=early-prune ostree admin finalize-staged |& tee out.txt; then assert_not_reached "successfully wrote to filled up bootfs" fi +assert_file_has_content out.txt "Disabling auto-prune optimization; insufficient space left in bootfs" assert_file_has_content out.txt "No space left on device" rm out.txt unconsume_bootfs_space