lib/repo-pull: fix GPG check while pulling remote
authorDenis Pynkin <denis.pynkin@collabora.com>
Mon, 6 Apr 2020 22:11:29 +0000 (01:11 +0300)
committerDenis Pynkin <denis.pynkin@collabora.com>
Mon, 6 Apr 2020 22:11:29 +0000 (01:11 +0300)
If GPG support is disabled in a build time we should to check if any of
options "gpg_verify" or "gpg_verify_summary" is set to TRUE instead
of checking if they are passed via options while pulling from remote.

Fixed the failure with assertion of `ostree find-remotes --pull --mirror`
calling (`tests/test-pull-collections.sh`) if libostree has been compiled
without GPG support.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
src/libostree/ostree-repo-pull.c

index 454eaf8ac5254ccf57663a2ab63812f2073e3b5c..56c0508dd6c121e514a2724cd26b15c24a3ae331 100644 (file)
@@ -3856,7 +3856,7 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
 
 #ifdef OSTREE_DISABLE_GPGME
   /* Explicitly fail here if gpg verification is requested and we have no GPG support */
-  if (opt_gpg_verify_set || opt_gpg_verify_summary_set)
+  if (pull_data->gpg_verify || pull_data->gpg_verify_summary)
   {
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
               "'%s': GPG feature is disabled in a build time",