[git] GnuPG - branch, master, updated. gnupg-2.1.17-93-ge926f30

by Werner Koch cvs at cvs.gnupg.org
Thu Jan 19 17:00:32 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 "The GNU Privacy Guard".

The branch, master has been updated
       via  e926f30a1cda75f6334b79c303b5134f0441a3dc (commit)
       via  e031b3c16cfec583c4322c84d299b355f0849c77 (commit)
      from  3daeef702b2e6a42f0f396b828f86ffc3f33fc88 (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 e926f30a1cda75f6334b79c303b5134f0441a3dc
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jan 19 15:01:44 2017 +0100

    build: Print a commit id in the generated ChangeLog
    
    * build-aux/gitlog-to-changelog: Print an extra line with the commit
    id.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 24a3d72..f70f499 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -179,6 +179,7 @@ sub parse_amend_file($)
   my $amend_file;
   my $append_dot = 0;
   my $tear_off = 0;
+  my $firstline;
   GetOptions
     (
      help => sub { usage 0 },
@@ -338,7 +339,9 @@ sub parse_amend_file($)
           # Prefix each non-empty line with a TAB.
           @line = map { length $_ ? "\t$_" : '' } @line;
 
-          print "\n", join ("\n", @line), "\n";
+          $firstline = shift @line;
+          print "\n", $firstline, "\n", "\t+ commit $sha\n";
+          print join ("\n", @line), "\n";
         }
 
     SKIPCOMMIT:

commit e031b3c16cfec583c4322c84d299b355f0849c77
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jan 19 14:58:23 2017 +0100

    common: Fix buffer copy code again.
    
    * common/exectool.c (my_error_from_errno): Remove.
    (copy_buffer_do_copy): Do without var RC.
    (copy_buffer_flush): Ditto.  Use ERRNO instead of es_write return
    code.
    (gnupg_exec_tool): Correctly return errors from es_read.
    --
    
    Fixes-commit: 55c9212a2338bf0b07c8cf3a69bcedaa28d48d43
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/common/exectool.c b/common/exectool.c
index 8c1f757..ed8225a 100644
--- a/common/exectool.c
+++ b/common/exectool.c
@@ -65,12 +65,6 @@ my_error_from_syserror (void)
   return gpg_err_make (default_errsource, gpg_err_code_from_syserror ());
 }
 
-static inline gpg_error_t
-my_error_from_errno (int rc)
-{
-  return gpg_err_make (default_errsource, gpg_err_code_from_errno (rc));
-}
-
 
 static void
 read_and_log_stderr (read_and_log_buffer_t *state, es_poll_t *fderr)
@@ -232,15 +226,13 @@ copy_buffer_shred (struct copy_buffer *c)
 static gpg_error_t
 copy_buffer_do_copy (struct copy_buffer *c, estream_t source, estream_t sink)
 {
-  int rc;
   gpg_error_t err;
   size_t nwritten = 0;
 
   if (c->nread == 0)
     {
       c->writep = c->buffer;
-      rc = es_read (source, c->buffer, sizeof c->buffer, &c->nread);
-      if (rc)
+      if (es_read (source, c->buffer, sizeof c->buffer, &c->nread))
         {
           err = my_error_from_syserror ();
           if (gpg_err_code (err) == GPG_ERR_EAGAIN)
@@ -256,8 +248,10 @@ copy_buffer_do_copy (struct copy_buffer *c, estream_t source, estream_t sink)
     return 0;	/* Done copying.  */
 
   nwritten = 0;
-  rc = sink? es_write (sink, c->writep, c->nread, &nwritten) : 0;
-  err = rc? my_error_from_errno (rc) : 0;
+  if (sink && es_write (sink, c->writep, c->nread, &nwritten))
+    err = my_error_from_syserror ();
+  else
+    err = 0;
 
   log_assert (nwritten <= c->nread);
   c->writep += nwritten;
@@ -283,13 +277,11 @@ copy_buffer_do_copy (struct copy_buffer *c, estream_t source, estream_t sink)
 static gpg_error_t
 copy_buffer_flush (struct copy_buffer *c, estream_t sink)
 {
-  int rc;
-  gpg_error_t err;
-  size_t nwritten;
+  gpg_error_t err = 0;
+  size_t nwritten = 0;
 
-  nwritten = 0;
-  rc = es_write (sink, c->writep, c->nread, &nwritten);
-  err = rc? my_error_from_errno (rc) : 0;
+  if (es_write (sink, c->writep, c->nread, &nwritten))
+    err = my_error_from_syserror ();
 
   log_assert (nwritten <= c->nread);
   c->writep += nwritten;
@@ -628,9 +620,11 @@ gnupg_exec_tool (const char *pgmname, const char *argv[],
 
   if (len)
     {
-      err = es_read (output, *result, len, &nread);
-      if (err)
-        goto leave;
+      if (es_read (output, *result, len, &nread))
+        {
+          err = my_error_from_syserror ();
+          goto leave;
+        }
       if (nread != len)
         log_fatal ("%s: short read from memstream\n", __func__);
     }

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

Summary of changes:
 build-aux/gitlog-to-changelog |  5 ++++-
 common/exectool.c             | 34 ++++++++++++++--------------------
 2 files changed, 18 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list