Bug 368950 - "No key imported" message upon successful import
Summary: "No key imported" message upon successful import
Status: RESOLVED FIXED
Alias: None
Product: kgpg
Classification: Applications
Component: general (show other bugs)
Version: 2.17.0
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Rolf Eike Beer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-17 14:23 UTC by Tristan Miller
Modified: 2017-10-18 17:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 17.08.3


Attachments
Screenshot showing misleading dialog (26.77 KB, image/png)
2016-09-17 14:23 UTC, Tristan Miller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Miller 2016-09-17 14:23:19 UTC
Someone sent me a signed copy of my key.  I opened this key in KGpg in order to import the new signature.  KGpg successfully imports the new signature, but then pops up a dialog that says "No key imported. Please see the detailed log for more information." (see attached).

The dialog message may be technically correct, as no new key was imported, only new signatures on an existing key.  However, the message is misleading, since it implies that nothing at all was done.  It would be better for the dialog to report the number of new signatures imported, the same way that the command-line gpg does.

Reproducible: Always

Steps to Reproduce:
1. Open a file containing an ASCII-armoured public key with a new signature.


Actual Results:  
2. "No key imported" dialog.

Expected Results:  
2. "Imported 1 new signature to key BF8A2EE4" dialog.
Comment 1 Tristan Miller 2016-09-17 14:23:45 UTC
Created attachment 101145 [details]
Screenshot showing misleading dialog
Comment 2 Tristan Miller 2016-09-17 14:25:08 UTC
Forgot to mention that I'm using KGpg 2.17.0 on KDE 4.14.18 with GnuPG 2.0.24 and libgcrypt 1.6.1.
Comment 3 Rolf Eike Beer 2017-10-18 17:08:35 UTC
Git commit 4b0b69868513f101c401c04d04c06a30d5a6c713 by Rolf Eike Beer.
Committed on 18/10/2017 at 17:04.
Pushed by dakon into branch 'Applications/17.08'.

fix message after importing keys

The message was telling that no key was imported if the last column of the
IMPORT_RES line was 0, which gives the keys that were not imported or the
skipped v3 keys depending on the version of GnuPG. Change the logic to what
is was meant to show: say nothing was imported if _all_ fields are 0.
FIXED-IN:17.08.3

M  +6    -9    transactions/kgpgimport.cpp

https://commits.kde.org/kgpg/4b0b69868513f101c401c04d04c06a30d5a6c713