mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-16 10:50:43 +03:00
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,
|
||||
GError **error)
|
||||
{
|
||||
GLNX_AUTO_PREFIX_ERROR ("Writing content object", error);
|
||||
g_return_val_if_fail (expected_checksum || out_csum, FALSE);
|
||||
|
||||
if (g_cancellable_set_error_if_cancelled (cancellable, error))
|
||||
@ -844,8 +845,7 @@ write_content_object (OstreeRepo *self,
|
||||
uid, gid, mode,
|
||||
xattrs,
|
||||
cancellable, error))
|
||||
return glnx_prefix_error (error, "Writing object %s.%s", actual_checksum,
|
||||
ostree_object_type_to_string (OSTREE_OBJECT_TYPE_FILE));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Update statistics */
|
||||
@ -886,6 +886,8 @@ adopt_and_commit_regfile (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
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_autoptr(GBytes) header = _ostree_file_header_new (finfo, xattrs);
|
||||
|
||||
@ -981,6 +983,8 @@ write_metadata_object (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GLNX_AUTO_PREFIX_ERROR ("Writing metadata object", error);
|
||||
|
||||
g_return_val_if_fail (expected_checksum || out_csum, FALSE);
|
||||
|
||||
if (g_cancellable_set_error_if_cancelled (cancellable, error))
|
||||
|
@ -1797,6 +1797,7 @@ repo_create_at_internal (int dfd,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GLNX_AUTO_PREFIX_ERROR ("Creating repo", error);
|
||||
struct stat stbuf;
|
||||
/* We do objects/ last - if it exists we do nothing and exit successfully */
|
||||
const char *state_dirs[] = { "tmp", "extensions", "state",
|
||||
|
Loading…
x
Reference in New Issue
Block a user