summaryrefslogtreecommitdiff
path: root/src/ostree/main.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/main.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/main.c')
-rw-r--r--src/ostree/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ostree/main.c b/src/ostree/main.c
index c5b45012..a523ff9a 100644
--- a/src/ostree/main.c
+++ b/src/ostree/main.c
@@ -72,9 +72,11 @@ static OstreeCommand commands[] = {
{ "fsck", OSTREE_BUILTIN_FLAG_NONE,
ostree_builtin_fsck,
"Check the repository for consistency" },
+#ifndef OSTREE_DISABLE_GPGME
{ "gpg-sign", OSTREE_BUILTIN_FLAG_NONE,
ostree_builtin_gpg_sign,
"Sign a commit" },
+#endif /* OSTREE_DISABLE_GPGME */
{ "init", OSTREE_BUILTIN_FLAG_NO_CHECK,
ostree_builtin_init,
"Initialize a new empty repository" },