lib/repo: Add some error prefixing in commit, repo create
I was getting a bare `error: Creating temp file: No such file or directory` when debugging `test-concurrency.py`; with this I get `error: Writing content object: Creating temp file: No such file or directory` which helps me pin it down. Closes: #1343 Approved by: cgwalters
This commit is contained in:
parent
89a57bb6d8
commit
e48262c659
|
|
@ -602,6 +602,7 @@ write_content_object (OstreeRepo *self,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
GLNX_AUTO_PREFIX_ERROR ("Writing content object", error);
|
||||||
g_return_val_if_fail (expected_checksum || out_csum, FALSE);
|
g_return_val_if_fail (expected_checksum || out_csum, FALSE);
|
||||||
|
|
||||||
if (g_cancellable_set_error_if_cancelled (cancellable, error))
|
if (g_cancellable_set_error_if_cancelled (cancellable, error))
|
||||||
|
|
@ -844,8 +845,7 @@ write_content_object (OstreeRepo *self,
|
||||||
uid, gid, mode,
|
uid, gid, mode,
|
||||||
xattrs,
|
xattrs,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
return glnx_prefix_error (error, "Writing object %s.%s", actual_checksum,
|
return FALSE;
|
||||||
ostree_object_type_to_string (OSTREE_OBJECT_TYPE_FILE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update statistics */
|
/* Update statistics */
|
||||||
|
|
@ -886,6 +886,8 @@ adopt_and_commit_regfile (OstreeRepo *self,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
GLNX_AUTO_PREFIX_ERROR ("Commit regfile (adopt)", error);
|
||||||
|
|
||||||
g_assert (G_IN_SET (self->mode, OSTREE_REPO_MODE_BARE, OSTREE_REPO_MODE_BARE_USER_ONLY));
|
g_assert (G_IN_SET (self->mode, OSTREE_REPO_MODE_BARE, OSTREE_REPO_MODE_BARE_USER_ONLY));
|
||||||
g_autoptr(GBytes) header = _ostree_file_header_new (finfo, xattrs);
|
g_autoptr(GBytes) header = _ostree_file_header_new (finfo, xattrs);
|
||||||
|
|
||||||
|
|
@ -981,6 +983,8 @@ write_metadata_object (OstreeRepo *self,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
GLNX_AUTO_PREFIX_ERROR ("Writing metadata object", error);
|
||||||
|
|
||||||
g_return_val_if_fail (expected_checksum || out_csum, FALSE);
|
g_return_val_if_fail (expected_checksum || out_csum, FALSE);
|
||||||
|
|
||||||
if (g_cancellable_set_error_if_cancelled (cancellable, error))
|
if (g_cancellable_set_error_if_cancelled (cancellable, error))
|
||||||
|
|
|
||||||
|
|
@ -1797,6 +1797,7 @@ repo_create_at_internal (int dfd,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
GLNX_AUTO_PREFIX_ERROR ("Creating repo", error);
|
||||||
struct stat stbuf;
|
struct stat stbuf;
|
||||||
/* We do objects/ last - if it exists we do nothing and exit successfully */
|
/* We do objects/ last - if it exists we do nothing and exit successfully */
|
||||||
const char *state_dirs[] = { "tmp", "extensions", "state",
|
const char *state_dirs[] = { "tmp", "extensions", "state",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue