[ostree] checkout: Add g_prefix_error() around more failures
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [ostree] checkout: Add g_prefix_error() around more failures
- Date: Tue, 10 Sep 2013 16:26:45 +0000 (UTC)
commit 4f236ebc1b63622c168f8af85bc9812cf4e1d68d
Author: Colin Walters <walters verbum org>
Date:   Tue Sep 10 11:53:40 2013 -0400
    checkout: Add g_prefix_error() around more failures
    
    So we can debug what's going wrong more easily.
 src/libostree/ostree-repo-checkout.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c
index 00ad135..2d6c514 100644
--- a/src/libostree/ostree-repo-checkout.c
+++ b/src/libostree/ostree-repo-checkout.c
@@ -345,6 +345,7 @@ checkout_file_hardlink (OstreeRepo                          *self,
     }
   else
     {
+      g_prefix_error (error, "Hardlinking %s to %s: ", loose_path, destination_name);
       ot_util_set_error_from_errno (error, errno);
       goto out;
     }
@@ -466,7 +467,10 @@ checkout_one_file_at (OstreeRepo                        *repo,
                                    destination_dfd, destination_name,
                                    FALSE, &did_hardlink,
                                    cancellable, error))
-        goto out;
+        {
+          g_prefix_error (error, "Using new cached uncompressed hardlink of %s to %s: ", checksum, 
destination_name);
+          goto out;
+        }
     }
 
   /* Fall back to copy if we couldn't hardlink */
@@ -481,8 +485,11 @@ checkout_one_file_at (OstreeRepo                        *repo,
           if (!checkout_file_unioning_from_input_at (mode, source_info, xattrs, input,
                                                      destination_dfd, destination_parent,
                                                      destination_name,
-                                                     cancellable, error))
-            goto out;
+                                                     cancellable, error)) 
+            {
+              g_prefix_error (error, "Union checkout of %s to %s: ", checksum, destination_name);
+              goto out;
+            }
         }
       else
         {
@@ -490,7 +497,10 @@ checkout_one_file_at (OstreeRepo                        *repo,
                                             destination_dfd, destination_parent,
                                             destination_name,
                                             cancellable, error))
-            goto out;
+            {
+              g_prefix_error (error, "Checkout of %s to %s: ", checksum, destination_name);
+              goto out;
+            }
         }
     }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]