mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-06 17:18:25 +03:00
repo: detached sigs: Use error prefixing instead of overwriting
Noted when "rpm-ostree compose sign" failed to write to a repo due to permissions.
This commit is contained in:
parent
ace982b51c
commit
152dcf89b5
@ -1925,6 +1925,7 @@ ostree_repo_read_commit_detached_metadata (OstreeRepo *self,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
g_prefix_error (error, "Unable to read existing detached metadata: ");
|
||||||
g_propagate_error (error, temp_error);
|
g_propagate_error (error, temp_error);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -1971,7 +1972,10 @@ ostree_repo_write_commit_detached_metadata (OstreeRepo *self,
|
|||||||
g_variant_get_size (normalized),
|
g_variant_get_size (normalized),
|
||||||
NULL, FALSE, 0, NULL,
|
NULL, FALSE, 0, NULL,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
|
{
|
||||||
|
g_prefix_error (error, "Unable to write detached metadata: ");
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
|
@ -2995,11 +2995,7 @@ ostree_repo_append_gpg_signature (OstreeRepo *self,
|
|||||||
&metadata,
|
&metadata,
|
||||||
cancellable,
|
cancellable,
|
||||||
error))
|
error))
|
||||||
{
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
|
||||||
"Unable to read existing detached metadata");
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
|
|
||||||
new_metadata = _ostree_detached_metadata_append_gpg_sig (metadata, signature_bytes);
|
new_metadata = _ostree_detached_metadata_append_gpg_sig (metadata, signature_bytes);
|
||||||
|
|
||||||
@ -3008,11 +3004,7 @@ ostree_repo_append_gpg_signature (OstreeRepo *self,
|
|||||||
new_metadata,
|
new_metadata,
|
||||||
cancellable,
|
cancellable,
|
||||||
error))
|
error))
|
||||||
{
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
|
||||||
"Unable to read existing detached metadata");
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
|
Loading…
Reference in New Issue
Block a user