[Slapt-get-user] GPG error

Jason Woodward woodwardj at jaos.org
Sun Jul 29 14:56:45 EDT 2007


Hi Dave,

Ooops, reposted patch.

> root: ~ > slapt-get --version
> slapt-get version 0.9.12a
> 
> root: ~ > slapt-get --add-keys
> Retrieving GPG key
> [ftp://ftp.slackware.com/pub/slackware/slackware-12.0/]...Cached
> slapt-get: src/gpgme.c:204:
> slapt_add_pkg_source_gpg_key: Assertion `e ==
> GPG_ERR_NO_ERROR' failed.
> 
> Just wondering if this error was common.
> slapt-get seems to function normally otherwise.
> 
> Thanks!
> 



Index: src/gpgme.c
===================================================================
RCS file: /var/cvs/slapt-get/src/gpgme.c,v
retrieving revision 1.2
diff -u -r1.2 gpgme.c
--- src/gpgme.c 27 Jun 2007 19:20:24 -0000      1.2
+++ src/gpgme.c 29 Jul 2007 18:55:35 -0000
@@ -201,7 +201,11 @@
   assert (e == GPG_ERR_NO_ERROR);
 
   e = gpgme_op_import(ctx, key_data);
-  assert (e == GPG_ERR_NO_ERROR);
+  if (e)
+  {
+    fprintf (stderr, "GPGME error (%s): %s\n", gpgme_strsource (e), gpgme_strerror (e));
+    exit(1);
+  }
 
   import_result = gpgme_op_import_result(ctx);
   if (import_result != NULL)
=== end patch



take care,
jason
--
Jason Woodward
woodwardj at jaos.org




More information about the Slapt-get-user mailing list