[git] GPGME - branch, master, updated. gpgme-1.8.0-19-gececfd5

by Andre Heinecke cvs at cvs.gnupg.org
Mon Jan 2 14:06:33 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  ececfd5de81f1851943be7b284b672d5b02aceb4 (commit)
       via  7103315829847163f1c6f52cad25d1ddb33358f0 (commit)
      from  a4b9f1a2b404fd8627d5ac567617510abd55d980 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ececfd5de81f1851943be7b284b672d5b02aceb4
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Jan 2 14:03:08 2017 +0100

    qt: Update config sync doc / comment
    
    * lang/qt/src/cryptoconfig.h (CryptoConfig::sync): Document
    that runtime option is always set.
    * lang/qt/Src/qgpgmenewcryptoconfig.cpp
    (QGpgMENewCryptoConfigComponent::sync): Remove outdated comment
    and warn on error.

diff --git a/lang/qt/src/cryptoconfig.h b/lang/qt/src/cryptoconfig.h
index c3f0c7e..452bfbb 100644
--- a/lang/qt/src/cryptoconfig.h
+++ b/lang/qt/src/cryptoconfig.h
@@ -379,9 +379,8 @@ public:
     /**
      * Write back changes
      *
-     * @param runtime If this option is set, the changes will take effect at run-time, as
-     * far as this is possible.  Otherwise, they will take effect at the next
-     * start of the respective backend programs.
+     * @param runtime this parameter is ignored. Changes will always
+     * be made with --runtime set.
      */
     virtual void sync(bool runtime) = 0;
 
diff --git a/lang/qt/src/qgpgmenewcryptoconfig.cpp b/lang/qt/src/qgpgmenewcryptoconfig.cpp
index eb3af56..49b27ca 100644
--- a/lang/qt/src/qgpgmenewcryptoconfig.cpp
+++ b/lang/qt/src/qgpgmenewcryptoconfig.cpp
@@ -216,17 +216,12 @@ QGpgMENewCryptoConfigGroup *QGpgMENewCryptoConfigComponent::group(const QString
 
 void QGpgMENewCryptoConfigComponent::sync(bool runtime)
 {
-    Q_UNUSED(runtime)
-    // ### how to pass --runtime to gpgconf? -> marcus: not yet supported (2010-11-20)
+    Q_UNUSED(runtime) // runtime is always set by engine_gpgconf
     if (const Error err = m_component.save()) {
-#if 0
-        TODO port
-        const QString wmsg = i18n("Error from gpgconf while saving configuration: %1", QString::fromLocal8Bit(err.asString()));
-        qCWarning(GPGPME_BACKEND_LOG) << ":" << wmsg;
-        KMessageBox::error(0, wmsg);
-#endif
+        qCWarning(GPGPME_BACKEND_LOG) << ":"
+            << "Error from gpgconf while saving configuration: %1"
+            << QString::fromLocal8Bit(err.asString());
     }
-    // ### unset dirty state again
 }
 
 ////

commit 7103315829847163f1c6f52cad25d1ddb33358f0
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Jan 2 13:11:10 2017 +0100

    core: Always use runtime for gpgconf changes
    
    * src/engine-gpgconf.c (gpgconf_write): Add --runtime.
    * src/gpgme.h.in (gpgme_conf_opt_change): Document this
    behavior.
    
    --
    If a tool uses GPGME for changing configuration values it
    needs a way to ensure that these changes take effect. Otherwise
    users may change and see config values and do not understand
    why they are not working.

diff --git a/src/engine-gpgconf.c b/src/engine-gpgconf.c
index 2ea8673..01a60eb 100644
--- a/src/engine-gpgconf.c
+++ b/src/engine-gpgconf.c
@@ -708,7 +708,7 @@ gpgconf_write (void *engine, const char *arg1, char *arg2, gpgme_data_t conf)
 #define BUFLEN 1024
   char buf[BUFLEN];
   int buflen = 0;
-  char *argv[6];
+  char *argv[7];
   int argc = 0;
   int rp[2];
   struct spawn_fd_item_s cfd[] = { {-1, 0 /* STDIN_FILENO */}, {-1, -1} };
@@ -724,6 +724,7 @@ gpgconf_write (void *engine, const char *arg1, char *arg2, gpgme_data_t conf)
       argv[argc++] = gpgconf->home_dir;
     }
 
+  argv[argc++] = (char*)"--runtime";
   argv[argc++] = (char*)arg1;
   argv[argc++] = arg2;
   argv[argc] = NULL;
diff --git a/src/gpgme.h.in b/src/gpgme.h.in
index 7cfe8f6..4fc119f 100644
--- a/src/gpgme.h.in
+++ b/src/gpgme.h.in
@@ -2410,7 +2410,8 @@ void gpgme_conf_arg_release (gpgme_conf_arg_t arg, gpgme_conf_type_t type);
 /* Register a change for the value of OPT to ARG.  If RESET is 1 (do
    not use any values but 0 or 1), ARG is ignored and the option is
    not changed (reverting a previous change).  Otherwise, if ARG is
-   NULL, the option is cleared or reset to its default.  */
+   NULL, the option is cleared or reset to its default. The change
+   is done with gpgconf's --runtime option to immediately take effect. */
 gpgme_error_t gpgme_conf_opt_change (gpgme_conf_opt_t opt, int reset,
 				     gpgme_conf_arg_t arg);
 

-----------------------------------------------------------------------

Summary of changes:
 lang/qt/src/cryptoconfig.h            |  5 ++---
 lang/qt/src/qgpgmenewcryptoconfig.cpp | 13 ++++---------
 src/engine-gpgconf.c                  |  3 ++-
 src/gpgme.h.in                        |  3 ++-
 4 files changed, 10 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list