show: add option --gpg-homedir
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
1 parent
f37cbe1fc9
commit
cd93780d97
3 files changed
+15
-1
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user