summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-show.c
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2015-04-27 11:15:40 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2015-04-27 15:22:41 +0200
commitcd93780d974866069793932c8437ba4cf83ec3a7 (patch)
treee5b9c5dad6e61c40d16ee1fe01033aef57297019 /src/ostree/ot-builtin-show.c
parentf37cbe1fc970b079877f4fea7d1c17fef937ee21 (diff)
downloadostree-cd93780d974866069793932c8437ba4cf83ec3a7.tar.gz
show: add option --gpg-homedir
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'src/ostree/ot-builtin-show.c')
-rw-r--r--src/ostree/ot-builtin-show.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ostree/ot-builtin-show.c b/src/ostree/ot-builtin-show.c
index e471ced7..1729f913 100644
--- a/src/ostree/ot-builtin-show.c
+++ b/src/ostree/ot-builtin-show.c
@@ -33,6 +33,7 @@ static char* opt_print_variant_type;
static char* opt_print_metadata_key;
static char* opt_print_detached_metadata_key;
static gboolean opt_raw;
+static char *opt_gpg_homedir;
static GOptionEntry options[] = {
{ "print-related", 0, 0, G_OPTION_ARG_NONE, &opt_print_related, "Show the \"related\" commits", NULL },
@@ -40,6 +41,7 @@ static GOptionEntry options[] = {
{ "print-metadata-key", 0, 0, G_OPTION_ARG_STRING, &opt_print_metadata_key, "Print string value of metadata key", "KEY" },
{ "print-detached-metadata-key", 0, 0, G_OPTION_ARG_STRING, &opt_print_detached_metadata_key, "Print string value of detached metadata key", "KEY" },
{ "raw", 0, 0, G_OPTION_ARG_NONE, &opt_raw, "Show raw variant data" },
+ { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"},
{ NULL }
};
@@ -169,9 +171,10 @@ print_object (OstreeRepo *repo,
{
gs_unref_object OstreeGpgVerifyResult *result = NULL;
GError *local_error = NULL;
+ gs_unref_object GFile *gpg_homedir = opt_gpg_homedir ? g_file_new_for_path (opt_gpg_homedir) : NULL;
result = ostree_repo_verify_commit_ext (repo, checksum,
- NULL, NULL, NULL,
+ gpg_homedir, NULL, NULL,
&local_error);
if (g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))