deploy: Add some error prefixing
authorColin Walters <walters@verbum.org>
Wed, 16 Aug 2023 20:16:24 +0000 (16:16 -0400)
committerColin Walters <walters@verbum.org>
Wed, 16 Aug 2023 20:16:24 +0000 (16:16 -0400)
We saw a bare
`Txn Rebase on <osname> failed: Failed to find kernel in /usr/lib/modules, /usr/lib/ostree-boot or /boot`
which isn't bad, but it'd be better to be a bit more specific.

src/libostree/ostree-sysroot-deploy.c

index 1f37909dbe5e647741c04a4d276aa5b57f6c50d6..48a49e47f635a7d1a3d961f5879c2af9107a8d90 100644 (file)
@@ -3130,6 +3130,8 @@ sysroot_initialize_deployment (OstreeSysroot *self, const char *osname, const ch
                                OstreeDeployment **out_new_deployment, GCancellable *cancellable,
                                GError **error)
 {
+  GLNX_AUTO_PREFIX_ERROR ("Initializing deployment", error);
+
   g_assert (osname != NULL || self->booted_deployment != NULL);
 
   if (osname == NULL)
@@ -3460,6 +3462,8 @@ ostree_sysroot_deploy_tree_with_options (OstreeSysroot *self, const char *osname
                                          OstreeDeployment **out_new_deployment,
                                          GCancellable *cancellable, GError **error)
 {
+  GLNX_AUTO_PREFIX_ERROR ("Deploying tree", error);
+
   if (!_ostree_sysroot_ensure_writable (self, error))
     return FALSE;
 
@@ -3664,6 +3668,8 @@ ostree_sysroot_stage_tree_with_options (OstreeSysroot *self, const char *osname,
                                         OstreeDeployment **out_new_deployment,
                                         GCancellable *cancellable, GError **error)
 {
+  GLNX_AUTO_PREFIX_ERROR ("Staging deployment", error);
+
   if (!_ostree_sysroot_ensure_writable (self, error))
     return FALSE;