lib/deploy: Log case when auto-pruning is hopeless

For easier diagnostics.
This commit is contained in:
Jonathan Lebon 2023-05-27 10:35:12 -04:00
parent 115d5cf073
commit a3c0d6a3fe
2 changed files with 2 additions and 0 deletions

View File

@ -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;
}

View File

@ -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