[packagekit] packagekit: Branch 'master' - 7 commits

Richard Hughes hughsient at kemper.freedesktop.org
Sat Oct 13 00:56:35 PDT 2007


 backends/dummy/pk-backend-dummy.c  |    5 +--
 backends/yum/helpers/yumBackend.py |   56 ++++++++++++++++++++++++++++++++++++-
 client/pk-console.c                |   17 +++++------
 docs/backends.xml                  |    2 -
 docs/introduction.xml              |   24 +++++++++------
 libpackagekit/pk-client.c          |   21 +++++++------
 python/packagekit/backend.py       |   16 ++++++++++
 src/pk-backend.c                   |   17 ++++++-----
 src/pk-backend.h                   |    1 
 src/pk-engine.c                    |   15 +++++----
 src/pk-interface.xml               |    1 
 src/pk-marshal.list                |    3 +
 12 files changed, 131 insertions(+), 47 deletions(-)

New commits:
diff-tree 8fe0fa647216a28af14389772f954db514484af3 (from c8b0299410f9482216901b94a133acc77aaf8468)
Author: Luke Macken <lmacken at redhat.com>
Date:   Sat Oct 13 01:59:38 2007 -0400

    raise yum.Errors.YumGPGCheckError in PackageKitYumBase._checkSignatures

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 39e2338..e2f2827 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -778,7 +778,7 @@ class PackageKitYumBase(yum.YumBase):
             elif result == 1:
                 self.getKeyForPackage(po, fullaskcb=self._fullAskForGPGKeyImport)
             else:
-                raise YumGPGCheckError, errmsg
+                raise yum.Errors.YumGPGCheckError, errmsg
 
         return 0
 
diff-tree c8b0299410f9482216901b94a133acc77aaf8468 (from b488e3c224fefd03d2ae232d2475c9788db0dc74)
Author: Luke Macken <lmacken at redhat.com>
Date:   Sat Oct 13 01:57:41 2007 -0400

    Remove unnecessary sys module

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 2fd9fdd..39e2338 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -20,7 +20,6 @@
 
 # imports
 
-import sys
 import re
 
 from packagekit.backend import *
diff-tree b488e3c224fefd03d2ae232d2475c9788db0dc74 (from ed1ff3f00b4291dd0b07f1b0f2125d84382d3a09)
Author: Luke Macken <lmacken at redhat.com>
Date:   Sat Oct 13 01:24:41 2007 -0400

    Fix a bunch of typos and spacing issues in the introduction.xml

diff --git a/docs/introduction.xml b/docs/introduction.xml
index f9ffb82..7c42090 100644
--- a/docs/introduction.xml
+++ b/docs/introduction.xml
@@ -287,14 +287,14 @@
       </para>
       <para>
         Every error should have an enumerated type
-        (e.g. <literal>out-of-memory</literal>) and also an error dscription.
+        (e.g. <literal>out-of-memory</literal>) and also an error description.
         The error description is not translated and not converted into the users
         locale.
         The error description should be descriptive, as it's for power users
         and people trying to debug the problem.
         For instance, "Out of memory" is not helpful as an error description,
         but "Could not create database index" is.
-        For the description use <literal>;</literal> to seporate the lines if
+        For the description use <literal>;</literal> to separate the lines if
         required.
       </para>
       <para>
@@ -531,7 +531,7 @@
     <sect2 id="config-main">
       <title>Daemon Config Options</title>
       <para>
-        The config file <literal>/etc/PackageKit.conf</literal>allows to the
+        The config file <literal>/etc/PackageKit.conf</literal> allows to the
         administrator to change system daemon options.
         In normal use this file does not have to be changed, but it may be
         useful to people debugging the daemon or developing backends.
@@ -604,7 +604,7 @@
       </para>
       <para>
         <literal>Package</literal> enumerated types should be
-        <literal>available</literal> or<literal>installed</literal>.
+        <literal>available</literal> or <literal>installed</literal>.
       </para>
     </sect2>
 
@@ -641,7 +641,7 @@
       </para>
       <para>
         <literal>Package</literal> enumerated types should be
-        <literal>available</literal> or<literal>installed</literal>.
+        <literal>available</literal> or <literal>installed</literal>.
       </para>
     </sect2>
 
@@ -681,7 +681,7 @@
       </para>
       <para>
         <literal>Package</literal> enumerated types should be
-        <literal>available</literal> or<literal>installed</literal>.
+        <literal>available</literal> or <literal>installed</literal>.
       </para>
     </sect2>
 
@@ -720,7 +720,7 @@
       </para>
       <para>
         <literal>Package</literal> enumerated types should be
-        <literal>available</literal> or<literal>installed</literal>.
+        <literal>available</literal> or <literal>installed</literal>.
       </para>
     </sect2>
 
@@ -899,7 +899,7 @@
       </para>
       <para>
         <literal>Package</literal> enumerated types should be
-        <literal>available</literal> or<literal>installed</literal>.
+        <literal>available</literal> or <literal>installed</literal>.
       </para>
     </sect2>
 
@@ -935,7 +935,7 @@
       </para>
       <para>
         <literal>Package</literal> enumerated types should be
-        <literal>available</literal> or<literal>installed</literal>.
+        <literal>available</literal> or <literal>installed</literal>.
       </para>
     </sect2>
 
@@ -1007,7 +1007,7 @@
       </para>
       <para>
         <literal>Package</literal> enumerated types should be
-        <literal>available</literal> or<literal>installed</literal>.
+        <literal>available</literal> or <literal>installed</literal>.
       </para>
     </sect2>
 
diff-tree ed1ff3f00b4291dd0b07f1b0f2125d84382d3a09 (from parents)
Merge: 38f0c00376837f725d7ea0cf550414d984e98372 0e77e7fe56093117dbf5ac0d7d3475e44de3c7df
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Fri Oct 12 22:05:51 2007 -0400

    Merge branch 'master' of git+ssh://rnorwood@git.packagekit.org/srv/git/PackageKit

diff --cc backends/yum/helpers/yumBackend.py
index 2e37078,a022c1f..2fd9fdd
@@@ -32,11 -32,21 +32,25 @@@
  from yum.callbacks import *
  from yum.misc import prco_tuple_to_string, unique
  import rpmUtils
 +import exceptions
 +
 +class GPGKeyNotImported(exceptions.Exception):
 +    pass
  
+ class PackageKitYumBase(yum.YumBase):
+     """ 
+     Custom YumBase Class for PackageKit
+     Used to overload methods in YumBase there need to be different in
+     PackageKit
+     
+     """
+     def _askForGPGKeyImport(self, po, userid, hexkeyid):
+         ''' 
+         Ask for GPGKeyImport 
+         '''
+         # TODO: Add code here to send the RepoSignatureRequired signal
+         return False    
+ 
  class PackageKitYumBackend(PackageKitBaseBackend):
  
      # Packages there require a reboot
diff --cc libpackagekit/pk-client.c
index 8e181f5,12b2c09..88b2b5d
@@@ -436,11 -501,17 +502,17 @@@
  	g_return_if_fail (client != NULL);
  	g_return_if_fail (PK_IS_CLIENT (client));
  	
+ 	/* check to see if we have been assigned yet */
+ 	if (client->priv->tid == NULL) {
+ 		pk_debug ("ignoring tid:%s as we are not yet assigned", tid);
+ 		return;
+ 	}
+ 
  	if (pk_transaction_id_equal (tid, client->priv->tid) == TRUE) {
 -		pk_debug ("emit repo_signature_required tid:%s, %s, %s, %s, %s, %s, %s",
 -			  tid, repository_name, key_url, key_userid, key_id, key_timestamp, type_text);
 +		pk_debug ("emit repo_signature_required tid:%s, %s, %s, %s, %s, %s, %s, %s",
 +			  tid, repository_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, type_text);
  		g_signal_emit (client, signals [PK_CLIENT_REPO_SIGNATURE_REQUIRED], 0,
 -			       repository_name, key_url, key_userid, key_id, key_timestamp, type_text);
 +			       repository_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, type_text);
  	}
  }
  
diff-tree 38f0c00376837f725d7ea0cf550414d984e98372 (from 0341703cacc9071b680938ef4e4445b406400d12)
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Fri Oct 12 22:05:25 2007 -0400

    Fix a couple of bugs in the last commit.
    - makes the repo-signature-required call work.

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 17c13da..2e37078 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -482,6 +482,7 @@ class PackageKitYumBackend(PackageKitBas
 # We need a yum with this change:
 # http://devel.linux.duke.edu/gitweb/?p=yum.git;a=commit;h=09640c743fb6a7ade5711183dc7d5964e1bd3221
 # to have fingerprint and timestamp available here
+# the above change is now in the latest yum for Fedor arawhide (yum-3.2.6-5.fc8)
                 self.repo_signature_required(keyData['po'].repoid,
                                              keyData['keyurl'],
                                              keyData['userid'],
@@ -489,7 +490,7 @@ class PackageKitYumBackend(PackageKitBas
                                              keyData['fingerprint'],
                                              keyData['timestamp'],
                                              'GPG')
-                self.error(ERROR_SIGNATURE_NOT_IMPORTED,retmsg)
+                self.error(ERROR_SIGNATURE_NOT_IMPORTED,"GPG key not imported.")
             except yum.Errors.YumBaseError, msgs:
                 retmsg = "Error in Transaction Processing;" +";".join(msgs)
                 self.error(ERROR_TRANSACTION_ERROR,retmsg)
diff --git a/src/pk-backend.c b/src/pk-backend.c
index e8e3014..079ff53 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -387,6 +387,9 @@ pk_backend_parse_common_error (PkBackend
 			goto out;
 		}
 		pk_backend_no_percentage_updates (backend);
+	} else if (strcmp (command, "repo-signature-required") == 0) {
+		ret = FALSE;
+		goto out;
 	} else {
 		pk_warning ("invalid command '%s'", command);
 	}
diff-tree 0341703cacc9071b680938ef4e4445b406400d12 (from parents)
Merge: c90af71ab403903abd368263eb9cd6219a2696c7 48f727193d0129293e8e5e7709e521d2809316dc
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Wed Oct 10 16:52:10 2007 -0400

    Merge branch 'master' of git+ssh://rnorwood@git.packagekit.org/srv/git/PackageKit

diff-tree c90af71ab403903abd368263eb9cd6219a2696c7 (from a1e38d00be13906cd5223d5d249118a02c5c3426)
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Wed Oct 10 16:52:04 2007 -0400

    Add gpg key notification

diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
index ed3e7b0..5efd320 100644
--- a/backends/dummy/pk-backend-dummy.c
+++ b/backends/dummy/pk-backend-dummy.c
@@ -199,8 +199,9 @@ backend_install_package (PkBackend *back
 
 	if(strcmp(package_id,"signedpackage;1.0-1.fc8;i386;fedora") == 0) {
 		pk_backend_repo_signature_required(backend, "updates", "http://example.com/gpgkey",
-						   "Test Key (Fedora) fedora at example.com",
-						   "BB7576AC", "2007-10-04", PK_SIGTYPE_ENUM_GPG);
+						   "Test Key (Fedora) fedora at example.com", "BB7576AC",
+						   "D8CC 06C2 77EC 9C53 372F  C199 B1EE 1799 F24F 1B08",
+						   "2007-10-04", PK_SIGTYPE_ENUM_GPG);
 		pk_backend_error_code (backend, PK_ERROR_ENUM_GPG_FAILURE,
 				       "GPG signed package could not be verified");
 		pk_backend_finished (backend);
diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index edd240b..17c13da 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -32,6 +32,10 @@ from yum.update_md import UpdateMetadata
 from yum.callbacks import *
 from yum.misc import prco_tuple_to_string, unique
 import rpmUtils
+import exceptions
+
+class GPGKeyNotImported(exceptions.Exception):
+    pass
 
 class PackageKitYumBackend(PackageKitBaseBackend):
 
@@ -43,7 +47,7 @@ class PackageKitYumBackend(PackageKitBas
 
     def __init__(self,args):
         PackageKitBaseBackend.__init__(self,args)
-        self.yumbase = yum.YumBase()
+        self.yumbase = PackageKitYumBase()
 
     def _get_package_ver(self,po):
         ''' return the a ver as epoch:version-release or version-release, if epoch=0'''
@@ -469,6 +473,23 @@ class PackageKitYumBackend(PackageKitBas
             except yum.Errors.YumGPGCheckError, msgs:
                 retmsg = "Error in Package Signatures;" +";".join(msgs)
                 self.error(ERROR_INTERNAL_ERROR,retmsg)
+            except GPGKeyNotImported, e:
+                keyData = self.yumbase.missingGPGKey                
+                if not keyData:
+                    self.error(ERROR_INTERNAL_ERROR,
+                               "GPG key not imported, but no GPG information received from Yum.")
+
+# We need a yum with this change:
+# http://devel.linux.duke.edu/gitweb/?p=yum.git;a=commit;h=09640c743fb6a7ade5711183dc7d5964e1bd3221
+# to have fingerprint and timestamp available here
+                self.repo_signature_required(keyData['po'].repoid,
+                                             keyData['keyurl'],
+                                             keyData['userid'],
+                                             keyData['hexkeyid'],
+                                             keyData['fingerprint'],
+                                             keyData['timestamp'],
+                                             'GPG')
+                self.error(ERROR_SIGNATURE_NOT_IMPORTED,retmsg)
             except yum.Errors.YumBaseError, msgs:
                 retmsg = "Error in Transaction Processing;" +";".join(msgs)
                 self.error(ERROR_TRANSACTION_ERROR,retmsg)
@@ -718,3 +739,36 @@ class ProcessTransPackageKitCallback:
             self.base.allow_interrupt(False)
             self.base.percentage(50)
             pass
+
+
+class PackageKitYumBase(yum.YumBase):
+    """
+    Subclass of YumBase.  Needed so we can overload _checkSignatures
+    and nab the gpg sig data
+    """
+
+    def __init__(self):
+        yum.YumBase.__init__(self)
+        self.missingGPGKey = None
+
+    def _checkSignatures(self,pkgs,callback):
+        ''' The the signatures of the downloaded packages '''
+        # This can be overloaded by a subclass.
+        
+        for po in pkgs:
+            result, errmsg = self.sigCheckPkg(po)
+            if result == 0:
+                # Verified ok, or verify not req'd
+                continue            
+            elif result == 1:
+                self.getKeyForPackage(po, fullaskcb=self._fullAskForGPGKeyImport)
+            else:
+                raise YumGPGCheckError, errmsg
+
+        return 0
+
+    def _fullAskForGPGKeyImport(self, data):
+        self.missingGPGKey = data
+
+        raise GPGKeyNotImported()
+
diff --git a/client/pk-console.c b/client/pk-console.c
index e35fbbd..0b98fd5 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -425,16 +425,17 @@ pk_console_description_cb (PkClient *cli
  **/
 static void
 pk_console_repo_signature_required_cb (PkClient *client, const gchar *repository_name, const gchar *key_url,
-				       const gchar *key_userid, const gchar *key_id, const gchar *key_timestamp,
-				       PkSigTypeEnum type, gpointer data)
+				       const gchar *key_userid, const gchar *key_id, const gchar *key_fingerprint,
+				       const gchar *key_timestamp, PkSigTypeEnum type, gpointer data)
 {
 	g_print ("Signature Required\n");
-	g_print ("  repo name:     '%s'\n", repository_name);
-	g_print ("  key url:       '%s'\n", key_url);
-	g_print ("  key userid:    '%s'\n", key_userid);
-	g_print ("  key id:        '%s'\n", key_id);
-	g_print ("  key timestamp: '%s'\n", key_timestamp);
-	g_print ("  key type:      '%s'\n", pk_sig_type_enum_to_text (type));
+	g_print ("  repo name:       '%s'\n", repository_name);
+	g_print ("  key url:         '%s'\n", key_url);
+	g_print ("  key userid:      '%s'\n", key_userid);
+	g_print ("  key id:          '%s'\n", key_id);
+	g_print ("  key fingerprint: '%s'\n", key_fingerprint);
+	g_print ("  key timestamp:   '%s'\n", key_timestamp);
+	g_print ("  key type:        '%s'\n", pk_sig_type_enum_to_text (type));
 
 }
 
diff --git a/docs/backends.xml b/docs/backends.xml
index 62d23d0..51217a4 100644
--- a/docs/backends.xml
+++ b/docs/backends.xml
@@ -176,7 +176,7 @@
           </row>
           <row>
             <entry>RepoSignatureRequired</entry>
-            <entry><literal>repository_name[tab]key_url[tab]key_userid[tab]key_id[tab]key_timestamp[tab]type</literal></entry>
+            <entry><literal>repository_name[tab]key_url[tab]key_userid[tab]key_id[tab]key_fingerprint[tab]key_timestamp[tab]type</literal></entry>
             <entry><literal>stdout</literal></entry>
           </row>
         </tbody>
diff --git a/docs/introduction.xml b/docs/introduction.xml
index 5df7e1e..15ed0e7 100644
--- a/docs/introduction.xml
+++ b/docs/introduction.xml
@@ -1495,6 +1495,10 @@
               <entry>A unique identifier for the key</entry>
             </row>
             <row>
+              <entry><literal>key_fingerprint</literal></entry>
+              <entry>The hashed fingerprint of the key</entry>
+            </row>
+            <row>
               <entry><literal>key_timestamp</literal></entry>
               <entry>The date the key was created</entry>
             </row>
diff --git a/libpackagekit/pk-client.c b/libpackagekit/pk-client.c
index 48a93a8..8e181f5 100644
--- a/libpackagekit/pk-client.c
+++ b/libpackagekit/pk-client.c
@@ -430,16 +430,17 @@ pk_client_description_cb (DBusGProxy  *p
 static void
 pk_client_repo_signature_required_cb (DBusGProxy *proxy, const gchar *tid, const gchar *repository_name,
 				      const gchar *key_url, const gchar *key_userid, const gchar *key_id, 
-				      const gchar *key_timestamp, const gchar *type_text, PkClient *client)
+				      const gchar *key_fingerprint, const gchar *key_timestamp,
+				      const gchar *type_text, PkClient *client)
 {
 	g_return_if_fail (client != NULL);
 	g_return_if_fail (PK_IS_CLIENT (client));
 	
 	if (pk_transaction_id_equal (tid, client->priv->tid) == TRUE) {
-		pk_debug ("emit repo_signature_required tid:%s, %s, %s, %s, %s, %s, %s",
-			  tid, repository_name, key_url, key_userid, key_id, key_timestamp, type_text);
+		pk_debug ("emit repo_signature_required tid:%s, %s, %s, %s, %s, %s, %s, %s",
+			  tid, repository_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, type_text);
 		g_signal_emit (client, signals [PK_CLIENT_REPO_SIGNATURE_REQUIRED], 0,
-			       repository_name, key_url, key_userid, key_id, key_timestamp, type_text);
+			       repository_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, type_text);
 	}
 }
 
@@ -1724,9 +1725,9 @@ pk_client_class_init (PkClientClass *kla
 	signals [PK_CLIENT_REPO_SIGNATURE_REQUIRED] =
 		g_signal_new ("repo-signature-required",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
-			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_UINT,
-			      G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
-			      G_TYPE_STRING, G_TYPE_UINT);
+			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_UINT,
+			      G_TYPE_NONE, 7, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+			      G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT);
 	signals [PK_CLIENT_ERROR_CODE] =
 		g_signal_new ("error-code",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
@@ -1832,9 +1833,9 @@ pk_client_init (PkClient *client)
 					   G_TYPE_STRING, G_TYPE_INVALID);
 
 	/* Repo Signature Required */
-	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_STRING,
+	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_STRING_STRING,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
-					   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+					   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
 
 	/* Package */
 	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING,
@@ -1906,7 +1907,7 @@ pk_client_init (PkClient *client)
 	dbus_g_proxy_add_signal (proxy, "RepoSignatureRequired",
 				 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
 				 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
-				 G_TYPE_STRING, G_TYPE_INVALID);
+				 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
 	dbus_g_proxy_connect_signal (proxy, "RepoSignatureRequired",
 				     G_CALLBACK (pk_client_repo_signature_required_cb), client, NULL);
 
diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index 203987c..254af81 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
@@ -29,6 +29,7 @@ ERROR_NO_NETWORK = "no-network"
 ERROR_NOT_SUPPORTED = "not-supported"
 ERROR_INTERNAL_ERROR = "internal-error"
 ERROR_GPG_FAILURE = "gpg-failure"
+ERROR_SIGNATURE_NOT_IMPORTED = "signature-not-imported"
 ERROR_PACKAGE_NOT_INSTALLED = "package-not-installed"
 ERROR_PACKAGE_ALREADY_INSTALLED = "package-already-installed"
 ERROR_PACKAGE_DOWNLOAD_FAILED = "package-download-failed"
@@ -147,6 +148,21 @@ class PackageKitBaseBackend:
             data = 'false'
         print >> sys.stderr,"allow-interrupt\t%s" % (data)
 
+    def repo_signature_required(self,repo_name,key_url,key_userid,key_id,key_fingerprint,key_timestamp,type):
+        '''
+        send 'repo-signature-required' signal:
+        @param repo_name:       Name of the repository
+        @param key_url:         URL which the user can use to verify the key
+        @param key_userid:      Key userid
+        @param key_id:          Key ID
+        @param key_fingerprint: Full key fingerprint
+        @param key_timestamp:   Key timestamp
+        @param type:            Key type (GPG)
+        '''
+        print >> sys.stderr,"repo-signature-required\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (
+            repo_name,key_url,key_userid,key_id,key_fingerprint,key_timestamp,type
+            )
+
     def get_package_id(self,name,version,arch,data):
         return "%s;%s;%s;%s" % (name,version,arch,data)
 
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 80f5479..73b8532 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -771,16 +771,16 @@ pk_backend_updates_changed (PkBackend *b
  **/
 gboolean
 pk_backend_repo_signature_required (PkBackend *backend, const gchar *repository_name, const gchar *key_url,
-				    const gchar *key_userid, const gchar *key_id, const gchar *key_timestamp,
-				    PkSigTypeEnum type)
+				    const gchar *key_userid, const gchar *key_id, const gchar *key_fingerprint,
+				    const gchar *key_timestamp, PkSigTypeEnum type)
 {
 	g_return_val_if_fail (backend != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
 
-	pk_debug ("emit repo-signature-required %s, %s, %s, %s, %s, %i",
-		  repository_name, key_url, key_userid, key_id, key_timestamp, type);
+	pk_debug ("emit repo-signature-required %s, %s, %s, %s, %s, %s, %i",
+		  repository_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, type);
 	g_signal_emit (backend, signals [PK_BACKEND_REPO_SIGNATURE_REQUIRED], 0,
-		       repository_name, key_url, key_userid, key_id, key_timestamp, type);
+		       repository_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, type);
 	return TRUE;
 }
 
@@ -1548,8 +1548,8 @@ pk_backend_class_init (PkBackendClass *k
 	signals [PK_BACKEND_REPO_SIGNATURE_REQUIRED] =
 		g_signal_new ("repo-signature-required",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
-			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING,
-			      G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_STRING,
+			      G_TYPE_NONE, 7, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
 			      G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
 	signals [PK_BACKEND_FINISHED] =
 		g_signal_new ("finished",
diff --git a/src/pk-backend.h b/src/pk-backend.h
index 04e7235..ab50d33 100644
--- a/src/pk-backend.h
+++ b/src/pk-backend.h
@@ -73,6 +73,7 @@ gboolean         pk_backend_repo_signatu
 							 const gchar    *key_url,
 							 const gchar    *key_userid,
 							 const gchar    *key_id,
+							 const gchar    *key_fingerprint,
 							 const gchar    *key_timestamp,
 							 PkSigTypeEnum   type);
 gboolean	 pk_backend_spawn_helper		(PkBackend	*backend,
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 8f658b3..570b438 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -347,8 +347,9 @@ pk_engine_updates_changed_cb (PkBackend 
  * pk_engine_repo_signature_required_cb:
  **/
 static void
-pk_engine_repo_signature_required_cb (PkBackend *backend, const gchar *repository_name, const gchar *key_url, const gchar *key_userid,
-				      const gchar *key_id, const gchar *key_timestamp, PkSigTypeEnum type, PkEngine *engine)
+pk_engine_repo_signature_required_cb (PkBackend *backend, const gchar *repository_name, const gchar *key_url,
+				      const gchar *key_userid, const gchar *key_id, const gchar *key_fingerprint,
+				      const gchar *key_timestamp, PkSigTypeEnum type, PkEngine *engine)
 {
 	PkTransactionItem *item;
 	const gchar *type_text;
@@ -363,10 +364,10 @@ pk_engine_repo_signature_required_cb (Pk
 	}
 	type_text = pk_sig_type_enum_to_text (type);
 
-	pk_debug ("emitting repo_signature_required tid:%s, %s, %s, %s, %s, %s, %s",
-		  item->tid, repository_name, key_url, key_userid, key_id, key_timestamp, type_text);
+	pk_debug ("emitting repo_signature_required tid:%s, %s, %s, %s, %s, %s, %s, %s",
+		  item->tid, repository_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, type_text);
 	g_signal_emit (engine, signals [PK_ENGINE_REPO_SIGNATURE_REQUIRED], 0,
-		       item->tid, repository_name, key_url, key_userid, key_id, key_timestamp, type_text);
+		       item->tid, repository_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, type_text);
 }
 
 /**
@@ -2109,8 +2110,8 @@ pk_engine_class_init (PkEngineClass *kla
 	signals [PK_ENGINE_REPO_SIGNATURE_REQUIRED] =
 		g_signal_new ("repo-signature-required",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
-			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_STRING,
-			      G_TYPE_NONE, 7, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_STRING_STRING,
+			      G_TYPE_NONE, 8, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
 			      G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
 	signals [PK_ENGINE_DESCRIPTION] =
 		g_signal_new ("description",
diff --git a/src/pk-interface.xml b/src/pk-interface.xml
index 3f106eb..c762735 100644
--- a/src/pk-interface.xml
+++ b/src/pk-interface.xml
@@ -152,6 +152,7 @@
       <arg type="s" name="key_url" direction="out"/>
       <arg type="s" name="key_userid" direction="out"/>
       <arg type="s" name="key_id" direction="out"/>
+      <arg type="s" name="key_fingerprint" direction="out"/>
       <arg type="s" name="key_timestamp" direction="out"/>
       <arg type="s" name="type" direction="out"/> <!-- 'gpg', for now -->
     </signal>
diff --git a/src/pk-marshal.list b/src/pk-marshal.list
index 618ff76..e5b4f1e 100644
--- a/src/pk-marshal.list
+++ b/src/pk-marshal.list
@@ -12,10 +12,11 @@ VOID:STRING,STRING,STRING
 VOID:STRING,STRING,STRING,STRING
 VOID:STRING,STRING,STRING,STRING,STRING
 VOID:STRING,STRING,STRING,STRING,STRING,STRING
+VOID:STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING
 VOID:STRING,STRING,STRING,STRING,STRING,STRING,STRING
 VOID:STRING,STRING,UINT,STRING,STRING,UINT64,STRING
 VOID:STRING,STRING,STRING,STRING,STRING,STRING,UINT64,STRING
-VOID:STRING,STRING,STRING,STRING,STRING,UINT
+VOID:STRING,STRING,STRING,STRING,STRING,STRING,UINT
 VOID:STRING,UINT,STRING,STRING
 VOID:STRING,STRING,UINT,UINT,UINT
 VOID:STRING,STRING,BOOL,UINT,UINT,STRING



More information about the PackageKit mailing list