repo: (minor) Drop a GFile usage in signature creation

Just one user of hundreds but, the rest of the function was ported
now.

Closes: #319
Approved by: jlebon
This commit is contained in:
Colin Walters 2016-06-03 11:04:17 -04:00 committed by Atomic Bot
parent 70e5489258
commit f94b191ae5
1 changed files with 1 additions and 3 deletions

View File

@ -4618,18 +4618,16 @@ ostree_repo_add_gpg_signature_summary (OstreeRepo *self,
{ {
gboolean ret = FALSE; gboolean ret = FALSE;
g_autoptr(GBytes) summary_data = NULL; g_autoptr(GBytes) summary_data = NULL;
g_autoptr(GFile) signature_path = NULL;
g_autoptr(GVariant) existing_signatures = NULL; g_autoptr(GVariant) existing_signatures = NULL;
g_autoptr(GVariant) new_metadata = NULL; g_autoptr(GVariant) new_metadata = NULL;
g_autoptr(GVariant) normalized = NULL; g_autoptr(GVariant) normalized = NULL;
guint i; guint i;
signature_path = g_file_resolve_relative_path (self->repodir, "summary.sig");
summary_data = ot_file_mapat_bytes (self->repo_dir_fd, "summary", error); summary_data = ot_file_mapat_bytes (self->repo_dir_fd, "summary", error);
if (!summary_data) if (!summary_data)
goto out; goto out;
if (!ot_util_variant_map_at (AT_FDCWD, gs_file_get_path_cached (signature_path), if (!ot_util_variant_map_at (self->repo_dir_fd, "summary.sig",
G_VARIANT_TYPE (OSTREE_SUMMARY_SIG_GVARIANT_STRING), G_VARIANT_TYPE (OSTREE_SUMMARY_SIG_GVARIANT_STRING),
OT_VARIANT_MAP_ALLOW_NOENT, &existing_signatures, error)) OT_VARIANT_MAP_ALLOW_NOENT, &existing_signatures, error))
goto out; goto out;