checkout: Add g_prefix_error() around more failures

So we can debug what's going wrong more easily.
This commit is contained in:
Colin Walters 2013-09-10 11:53:40 -04:00
parent fb1e140dba
commit 4f236ebc1b
1 changed files with 14 additions and 4 deletions

View File

@ -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,8 +467,11 @@ checkout_one_file_at (OstreeRepo *repo,
destination_dfd, destination_name,
FALSE, &did_hardlink,
cancellable, error))
{
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 */
if (!did_hardlink)
@ -482,17 +486,23 @@ checkout_one_file_at (OstreeRepo *repo,
destination_dfd, destination_parent,
destination_name,
cancellable, error))
{
g_prefix_error (error, "Union checkout of %s to %s: ", checksum, destination_name);
goto out;
}
}
else
{
if (!checkout_file_from_input_at (mode, source_info, xattrs, input,
destination_dfd, destination_parent,
destination_name,
cancellable, error))
{
g_prefix_error (error, "Checkout of %s to %s: ", checksum, destination_name);
goto out;
}
}
}
ret = TRUE;
out: