summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-show.c
diff options
context:
space:
mode:
authorDenis Pynkin <denis.pynkin@collabora.com>2019-05-21 01:35:25 +0300
committerAtomic Bot <atomic-devel@projectatomic.io>2019-08-01 02:06:47 +0000
commit0108e9ea4977ac730b5064b8198fe0ffd74df767 (patch)
tree558492822515c22316a04d06c2d6a8a521882813 /src/ostree/ot-builtin-show.c
parente187f240fc399f8d9d769cec631e1d046e065066 (diff)
downloadostree-0108e9ea4977ac730b5064b8198fe0ffd74df767.tar.gz
gpg: conditionally build GPG-related code for sign/verification
Do not build the code related to GPG sign and verification if GPGME support is disabled. Public functions return error 'G_IO_ERROR_NOT_SUPPORTED' in case if gpg-related check is rquested. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com> Closes: #1889 Approved by: cgwalters
Diffstat (limited to 'src/ostree/ot-builtin-show.c')
-rw-r--r--src/ostree/ot-builtin-show.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ostree/ot-builtin-show.c b/src/ostree/ot-builtin-show.c
index aca2cddd..5091a93c 100644
--- a/src/ostree/ot-builtin-show.c
+++ b/src/ostree/ot-builtin-show.c
@@ -164,6 +164,7 @@ print_object (OstreeRepo *repo,
flags |= OSTREE_DUMP_UNSWAPPED;
ot_dump_object (objtype, checksum, variant, flags);
+#ifndef OSTREE_DISABLE_GPGME
if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
{
g_autoptr(OstreeGpgVerifyResult) result = NULL;
@@ -207,6 +208,7 @@ print_object (OstreeRepo *repo,
g_print ("%s", buffer->str);
}
}
+#endif /* OSTREE_DISABLE_GPGME */
return TRUE;
}