socsvn commit: r253203 - in soc2013/mattbw: . dummy

mattbw at FreeBSD.org mattbw at FreeBSD.org
Tue Jun 18 21:00:18 UTC 2013


Author: mattbw
Date: Tue Jun 18 21:00:18 2013
New Revision: 253203
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=253203

Log:
  slight cosmetic/building tweaks on dummy, failed attempt to use GNetworkManager in prep for fixing packagekit proc issues

Added:
  soc2013/mattbw/dummy/Makefile
Modified:
  soc2013/mattbw/dummy/pk-backend-dummy.c
  soc2013/mattbw/test.c

Added: soc2013/mattbw/dummy/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2013/mattbw/dummy/Makefile	Tue Jun 18 21:00:18 2013	(r253203)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+LIB=		pk_backend_dummy
+SHLIB_MAJOR=	1
+SRCS=		pk-backend-dummy.c
+
+PKGS= 		pkg packagekit-plugin gio-2.0 gio-unix-2.0
+CFLAGS+=	`pkg-config --cflags ${PKGS}`
+CFLAGS+=	-DPK_COMPILATION
+LDFLAGS+=	`pkg-config --libs ${PKGS}`
+
+.include <bsd.lib.mk>

Modified: soc2013/mattbw/dummy/pk-backend-dummy.c
==============================================================================
--- soc2013/mattbw/dummy/pk-backend-dummy.c	Tue Jun 18 20:19:09 2013	(r253202)
+++ soc2013/mattbw/dummy/pk-backend-dummy.c	Tue Jun 18 21:00:18 2013	(r253203)
@@ -1,22 +1,27 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
+/*-
  * Copyright (C) 2007-2010 Richard Hughes <richard at hughsie.com>
+ *                    2013 Matt Windsor <mattbw at FreeBSD.org>
  *
  * Licensed under the GNU General Public License Version 2
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* NB: This is under heavy construction.  Currently, it's just the dummy backend
+ * from PackageKit with a few modifications to build using BSD makefiles.
+ * Eventually it will actually support pkgng!
  */
 
 #include <gmodule.h>
@@ -29,34 +34,37 @@
 #include "plugin/pk-backend.h"
 #include "plugin/pk-backend-job.h"
 
+#include "pkg.h"
+
+
 typedef struct {
-	gboolean	 has_signature;
-	gboolean	 repo_enabled_devel;
-	gboolean	 repo_enabled_fedora;
-	gboolean	 repo_enabled_livna;
-	gboolean	 repo_enabled_local;
-	gboolean	 updated_gtkhtml;
-	gboolean	 updated_kernel;
-	gboolean	 updated_powertop;
-	gboolean	 use_blocked;
-	gboolean	 use_distro_upgrade;
-	gboolean	 use_eula;
-	gboolean	 use_gpg;
-	gboolean	 use_media;
-	gboolean	 use_trusted;
-	gchar		**package_ids;
-	gchar		**values;
-	PkBitfield	 filters;
-	gboolean	 fake_db_locked;
-} PkBackendDummyPrivate;
+	gboolean	has_signature;
+	gboolean	repo_enabled_devel;
+	gboolean	repo_enabled_fedora;
+	gboolean	repo_enabled_livna;
+	gboolean	repo_enabled_local;
+	gboolean	updated_gtkhtml;
+	gboolean	updated_kernel;
+	gboolean	updated_powertop;
+	gboolean	use_blocked;
+	gboolean	use_distro_upgrade;
+	gboolean	use_eula;
+	gboolean	use_gpg;
+	gboolean	use_media;
+	gboolean	use_trusted;
+	gchar         **package_ids;
+	gchar         **values;
+	PkBitfield	filters;
+	gboolean	fake_db_locked;
+}		PkBackendDummyPrivate;
 
 typedef struct {
-	guint		 progress_percentage;
-	GSocket		*socket;
-	guint		 socket_listen_id;
-	GCancellable	*cancellable;
-	gulong		 signal_timeout;
-} PkBackendDummyJobData;
+	guint		progress_percentage;
+	GSocket        *socket;
+	guint		socket_listen_id;
+	GCancellable   *cancellable;
+	gulong		signal_timeout;
+}		PkBackendDummyJobData;
 
 static PkBackendDummyPrivate *priv;
 
@@ -64,10 +72,10 @@
  * pk_backend_initialize:
  */
 void
-pk_backend_initialize (PkBackend *backend)
+pk_backend_initialize(PkBackend * backend)
 {
 	/* create private area */
-	priv = g_new0 (PkBackendDummyPrivate, 1);
+	priv = g_new0(PkBackendDummyPrivate, 1);
 	priv->repo_enabled_fedora = TRUE;
 	priv->repo_enabled_devel = TRUE;
 	priv->repo_enabled_livna = TRUE;
@@ -78,64 +86,64 @@
  * pk_backend_destroy:
  */
 void
-pk_backend_destroy (PkBackend *backend)
+pk_backend_destroy(PkBackend * backend)
 {
-	g_free (priv);
+	g_free(priv);
 }
 
 /**
  * pk_backend_get_groups:
  */
 PkBitfield
-pk_backend_get_groups (PkBackend *backend)
+pk_backend_get_groups(PkBackend * backend)
 {
-	return pk_bitfield_from_enums (PK_GROUP_ENUM_ACCESSIBILITY,
-		PK_GROUP_ENUM_GAMES,
-		PK_GROUP_ENUM_SYSTEM,
-		-1);
+	return pk_bitfield_from_enums(PK_GROUP_ENUM_ACCESSIBILITY,
+				      PK_GROUP_ENUM_GAMES,
+				      PK_GROUP_ENUM_SYSTEM,
+				      -1);
 }
 
 /**
  * pk_backend_get_filters:
  */
 PkBitfield
-pk_backend_get_filters (PkBackend *backend)
+pk_backend_get_filters(PkBackend * backend)
 {
-	return pk_bitfield_from_enums (PK_FILTER_ENUM_GUI,
-		PK_FILTER_ENUM_INSTALLED,
-		PK_FILTER_ENUM_DEVELOPMENT,
-		-1);
+	return pk_bitfield_from_enums(PK_FILTER_ENUM_GUI,
+				      PK_FILTER_ENUM_INSTALLED,
+				      PK_FILTER_ENUM_DEVELOPMENT,
+				      -1);
 }
 
 /**
  * pk_backend_get_mime_types:
  */
-gchar **
-pk_backend_get_mime_types (PkBackend *backend)
+gchar         **
+pk_backend_get_mime_types(PkBackend * backend)
 {
-	const gchar *mime_types[] = {
-				"application/x-rpm",
-				"application/x-deb",
-				NULL };
-	return g_strdupv ((gchar **) mime_types);
+	const gchar    *mime_types[] = {
+		"application/x-rpm",
+		"application/x-deb",
+	NULL};
+	return g_strdupv((gchar **) mime_types);
 }
 
 /**
  * pk_backend_cancel_timeout:
  */
-static gboolean
-pk_backend_cancel_timeout (gpointer data)
+static		gboolean
+pk_backend_cancel_timeout(gpointer data)
 {
-	PkBackendJob *job = (PkBackendJob *) data;
-	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data (job);
+	PkBackendJob   *job = (PkBackendJob *) data;
+	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data(job);
 
 	/* we can now cancel again */
 	job_data->signal_timeout = 0;
 
 	/* now mark as finished */
-	pk_backend_job_error_code (job, PK_ERROR_ENUM_TRANSACTION_CANCELLED,
-				   "The task was stopped successfully");
-	pk_backend_job_finished (job);
+	pk_backend_job_error_code(job, PK_ERROR_ENUM_TRANSACTION_CANCELLED,
+				  "The task was stopped successfully");
+	pk_backend_job_finished(job);
 	return FALSE;
 }
 
@@ -143,18 +151,18 @@
  * pk_backend_cancel:
  */
 void
-pk_backend_cancel (PkBackend *backend, PkBackendJob *job)
+pk_backend_cancel(PkBackend * backend, PkBackendJob * job)
 {
-	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data (job);
+	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data(job);
 
 	/* try to cancel the transaction */
-	g_debug ("cancelling transaction");
-	g_cancellable_cancel (job_data->cancellable);
+	g_debug("cancelling transaction");
+	g_cancellable_cancel(job_data->cancellable);
 	if (job_data->signal_timeout != 0) {
-		g_source_remove (job_data->signal_timeout);
+		g_source_remove(job_data->signal_timeout);
 
 		/* emulate that it takes us a few ms to cancel */
-		g_timeout_add (1500, pk_backend_cancel_timeout, job);
+		g_timeout_add(1500, pk_backend_cancel_timeout, job);
 	}
 }
 
@@ -162,258 +170,258 @@
  * pk_backend_get_depends:
  */
 void
-pk_backend_get_depends (PkBackend *backend, PkBackendJob *job, PkBitfield filters, gchar **package_ids, gboolean recursive)
+pk_backend_get_depends(PkBackend * backend, PkBackendJob * job, PkBitfield filters, gchar ** package_ids, gboolean recursive)
 {
-	pk_backend_job_set_status (job, PK_STATUS_ENUM_QUERY);
+	pk_backend_job_set_status(job, PK_STATUS_ENUM_QUERY);
 
-	if (g_strcmp0 (package_ids[0], "scribus;1.3.4-1.fc8;i386;fedora") == 0) {
-		pk_backend_job_package (job, PK_INFO_ENUM_AVAILABLE,
-					"scribus-clipart;1.3.4-1.fc8;i386;fedora", "Clipart for scribus");
+	if (g_strcmp0(package_ids[0], "scribus;1.3.4-1.fc8;i386;fedora") == 0) {
+		pk_backend_job_package(job, PK_INFO_ENUM_AVAILABLE,
+				       "scribus-clipart;1.3.4-1.fc8;i386;fedora", "Clipart for scribus");
 	} else {
-		pk_backend_job_package (job, PK_INFO_ENUM_INSTALLED,
-					"glib2;2.14.0;i386;fedora", "The GLib library");
-		pk_backend_job_package (job, PK_INFO_ENUM_AVAILABLE,
-					"gtk2;gtk2-2.11.6-6.fc8;i386;fedora", "GTK+ Libraries for GIMP");
+		pk_backend_job_package(job, PK_INFO_ENUM_INSTALLED,
+			    "glib2;2.14.0;i386;fedora", "The GLib library");
+		pk_backend_job_package(job, PK_INFO_ENUM_AVAILABLE,
+				       "gtk2;gtk2-2.11.6-6.fc8;i386;fedora", "GTK+ Libraries for GIMP");
 	}
-	pk_backend_job_finished (job);
+	pk_backend_job_finished(job);
 }
 
 /**
  * pk_backend_get_details:
  */
 void
-pk_backend_get_details (PkBackend *backend, PkBackendJob *job, gchar **package_ids)
+pk_backend_get_details(PkBackend * backend, PkBackendJob * job, gchar ** package_ids)
 {
-	guint i;
-	guint len;
-	const gchar *package_id;
+	guint		i;
+	guint		len;
+	const gchar    *package_id;
 
-	pk_backend_job_set_status (job, PK_STATUS_ENUM_QUERY);
-	pk_backend_job_set_percentage (job, 0);
+	pk_backend_job_set_status(job, PK_STATUS_ENUM_QUERY);
+	pk_backend_job_set_percentage(job, 0);
 
 	/* each one has a different detail for testing */
-	len = g_strv_length (package_ids);
-	for (i=0; i<len; i++) {
+	len = g_strv_length(package_ids);
+	for (i = 0; i < len; i++) {
 		package_id = package_ids[i];
-		if (g_strcmp0 (package_id, "powertop;1.8-1.fc8;i386;fedora") == 0) {
-			pk_backend_job_details (job, "powertop;1.8-1.fc8;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
-						"PowerTOP is a tool that finds the software component(s) that make your "
-						"computer use more power than necessary while it is idle.", "http://live.gnome.org/powertop", 101*1024);
-		} else if (g_strcmp0 (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0) {
-			pk_backend_job_details (job, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
-						"The kernel package contains the Linux kernel (vmlinuz), the core of any "
-						"Linux operating system.  The kernel handles the basic functions of the "
-						"operating system: memory allocation, process allocation, device input "
-						"and output, etc.", "http://www.kernel.org", 33*1024*1024);
-		} else if (g_strcmp0 (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0) {
-			pk_backend_job_details (job, "gtkhtml2;2.19.1-4.fc8;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
-						"GtkHTML2 (sometimes called libgtkhtml) is a widget for displaying html "
-						"pages.", "http://live.gnome.org/gtkhtml", 133*1024);
-		} else if (g_strcmp0 (package_id, "vino;2.24.2.fc9;i386;fedora") == 0) {
-			pk_backend_job_details (job, "vino;2.24.2.fc9;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
-						"Vino is a VNC server for GNOME. It allows remote users to "
-						"connect to a running GNOME session using VNC.", "http://live.gnome.org/powertop", 3*1024*1024);
-		} else if (g_strcmp0 (package_id, "gnome-power-manager;2.6.19;i386;fedora") == 0) {
-			pk_backend_job_details (job, "gnome-power-manager;2.6.19;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
-						"GNOME Power Manager uses the information and facilities provided by HAL "
-						"displaying icons and handling user callbacks in an interactive GNOME session.\n"
-						"GNOME Power Preferences allows authorised users to set policy and "
-						"change preferences.", "http://projects.gnome.org/gnome-power-manager/", 13*1024*1024);
-		//TODO: add other packages
+		if (g_strcmp0(package_id, "powertop;1.8-1.fc8;i386;fedora") == 0) {
+			pk_backend_job_details(job, "powertop;1.8-1.fc8;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
+					       "PowerTOP is a tool that finds the software component(s) that make your "
+					       "computer use more power than necessary while it is idle.", "http://live.gnome.org/powertop", 101 * 1024);
+		} else if (g_strcmp0(package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0) {
+			pk_backend_job_details(job, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
+					       "The kernel package contains the Linux kernel (vmlinuz), the core of any "
+					       "Linux operating system.  The kernel handles the basic functions of the "
+					       "operating system: memory allocation, process allocation, device input "
+					       "and output, etc.", "http://www.kernel.org", 33 * 1024 * 1024);
+		} else if (g_strcmp0(package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0) {
+			pk_backend_job_details(job, "gtkhtml2;2.19.1-4.fc8;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
+					       "GtkHTML2 (sometimes called libgtkhtml) is a widget for displaying html "
+					       "pages.", "http://live.gnome.org/gtkhtml", 133 * 1024);
+		} else if (g_strcmp0(package_id, "vino;2.24.2.fc9;i386;fedora") == 0) {
+			pk_backend_job_details(job, "vino;2.24.2.fc9;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
+					       "Vino is a VNC server for GNOME. It allows remote users to "
+					       "connect to a running GNOME session using VNC.", "http://live.gnome.org/powertop", 3 * 1024 * 1024);
+		} else if (g_strcmp0(package_id, "gnome-power-manager;2.6.19;i386;fedora") == 0) {
+			pk_backend_job_details(job, "gnome-power-manager;2.6.19;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
+					       "GNOME Power Manager uses the information and facilities provided by HAL "
+					       "displaying icons and handling user callbacks in an interactive GNOME session.\n"
+					       "GNOME Power Preferences allows authorised users to set policy and "
+					       "change preferences.", "http://projects.gnome.org/gnome-power-manager/", 13 * 1024 * 1024);
+	//TODO:	add other packages
 		} else {
-			pk_backend_job_details (job, "scribus;1.3.4-1.fc8;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
-						"Scribus is an desktop *open source* page layöut program with "
-						"the aim of producing commercial grade output in **PDF** and "
-						"**Postscript**, primarily, though not exclusively for Linux.\n"
-						"\n"
-						"While the goals of the program are for ease of use and simple easy to "
-						"understand tools, Scribus offers support for professional publishing "
-						"features, such as CMYK color, easy PDF creation, Encapsulated Postscript "
-						"import/export and creation of color separations.", "http://live.gnome.org/scribus", 44*1024*1024);
+			pk_backend_job_details(job, "scribus;1.3.4-1.fc8;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
+					       "Scribus is an desktop *open source* page layöut program with "
+					       "the aim of producing commercial grade output in **PDF** and "
+					       "**Postscript**, primarily, though not exclusively for Linux.\n"
+					       "\n"
+					       "While the goals of the program are for ease of use and simple easy to "
+					       "understand tools, Scribus offers support for professional publishing "
+					       "features, such as CMYK color, easy PDF creation, Encapsulated Postscript "
+					       "import/export and creation of color separations.", "http://live.gnome.org/scribus", 44 * 1024 * 1024);
 		}
 	}
-	pk_backend_job_set_percentage (job, 100);
-	pk_backend_job_finished (job);
+	pk_backend_job_set_percentage(job, 100);
+	pk_backend_job_finished(job);
 }
 
 /**
  * pk_backend_get_distro_upgrades:
  */
 void
-pk_backend_get_distro_upgrades (PkBackend *backend, PkBackendJob *job)
+pk_backend_get_distro_upgrades(PkBackend * backend, PkBackendJob * job)
 {
-	pk_backend_job_set_status (job, PK_STATUS_ENUM_QUERY);
+	pk_backend_job_set_status(job, PK_STATUS_ENUM_QUERY);
 	if (!priv->use_distro_upgrade)
 		goto out;
-	pk_backend_job_distro_upgrade (job, PK_DISTRO_UPGRADE_ENUM_STABLE,
-				       "fedora-9", "Fedora 9");
-	pk_backend_job_distro_upgrade (job, PK_DISTRO_UPGRADE_ENUM_UNSTABLE,
-				       "fedora-10-rc1", "Fedora 10 RC1");
+	pk_backend_job_distro_upgrade(job, PK_DISTRO_UPGRADE_ENUM_STABLE,
+				      "fedora-9", "Fedora 9");
+	pk_backend_job_distro_upgrade(job, PK_DISTRO_UPGRADE_ENUM_UNSTABLE,
+				      "fedora-10-rc1", "Fedora 10 RC1");
 out:
-	pk_backend_job_finished (job);
+	pk_backend_job_finished(job);
 }
 
 /**
  * pk_backend_get_files:
  */
 void
-pk_backend_get_files (PkBackend *backend, PkBackendJob *job, gchar **package_ids)
+pk_backend_get_files(PkBackend * backend, PkBackendJob * job, gchar ** package_ids)
 {
-	guint i;
-	guint len;
-	const gchar *package_id;
+	guint		i;
+	guint		len;
+	const gchar    *package_id;
 
-	pk_backend_job_set_status (job, PK_STATUS_ENUM_QUERY);
+	pk_backend_job_set_status(job, PK_STATUS_ENUM_QUERY);
 
-	len = g_strv_length (package_ids);
-	for (i=0; i<len; i++) {
+	len = g_strv_length(package_ids);
+	for (i = 0; i < len; i++) {
 		package_id = package_ids[i];
-		if (g_strcmp0 (package_id, "powertop;1.8-1.fc8;i386;fedora") == 0)
-			pk_backend_job_files (job, package_id, "/usr/share/man/man1/boo;/usr/bin/xchat-gnome");
-		else if (g_strcmp0 (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0)
-			pk_backend_job_files (job, package_id, "/usr/share/man/man1;/usr/share/man/man1/gnome-power-manager.1.gz;/usr/lib/firefox-3.5.7/firefox");
-		else if (g_strcmp0 (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0)
-			pk_backend_job_files (job, package_id, "/usr/share/man/man1;/usr/bin/ck-xinit-session;/lib/libselinux.so.1");
+		if (g_strcmp0(package_id, "powertop;1.8-1.fc8;i386;fedora") == 0)
+			pk_backend_job_files(job, package_id, "/usr/share/man/man1/boo;/usr/bin/xchat-gnome");
+		else if (g_strcmp0(package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0)
+			pk_backend_job_files(job, package_id, "/usr/share/man/man1;/usr/share/man/man1/gnome-power-manager.1.gz;/usr/lib/firefox-3.5.7/firefox");
+		else if (g_strcmp0(package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0)
+			pk_backend_job_files(job, package_id, "/usr/share/man/man1;/usr/bin/ck-xinit-session;/lib/libselinux.so.1");
 		else
-			pk_backend_job_files (job, package_id, "/usr/share/gnome-power-manager;/usr/bin/ck-xinit-session");
+			pk_backend_job_files(job, package_id, "/usr/share/gnome-power-manager;/usr/bin/ck-xinit-session");
 	}
-	pk_backend_job_finished (job);
+	pk_backend_job_finished(job);
 }
 
 /**
  * pk_backend_get_requires:
  */
 void
-pk_backend_get_requires (PkBackend *backend, PkBackendJob *job, PkBitfield filters, gchar **package_ids, gboolean recursive)
+pk_backend_get_requires(PkBackend * backend, PkBackendJob * job, PkBitfield filters, gchar ** package_ids, gboolean recursive)
 {
-	pk_backend_job_set_status (job, PK_STATUS_ENUM_QUERY);
-	pk_backend_job_package (job, PK_INFO_ENUM_INSTALLED,
-				"glib2;2.14.0;i386;fedora", "The GLib library");
-	pk_backend_job_package (job, PK_INFO_ENUM_INSTALLED,
-				"gtk2;gtk2-2.11.6-6.fc8;i386;fedora", "GTK+ Libraries for GIMP");
-	pk_backend_job_finished (job);
+	pk_backend_job_set_status(job, PK_STATUS_ENUM_QUERY);
+	pk_backend_job_package(job, PK_INFO_ENUM_INSTALLED,
+			    "glib2;2.14.0;i386;fedora", "The GLib library");
+	pk_backend_job_package(job, PK_INFO_ENUM_INSTALLED,
+	   "gtk2;gtk2-2.11.6-6.fc8;i386;fedora", "GTK+ Libraries for GIMP");
+	pk_backend_job_finished(job);
 }
 
 /**
  * pk_backend_get_update_detail_timeout:
  **/
-static gboolean
-pk_backend_get_update_detail_timeout (gpointer data)
+static		gboolean
+pk_backend_get_update_detail_timeout(gpointer data)
 {
-	guint i;
-	guint len;
-	const gchar *package_id;
-	PkBackendJob *job = (PkBackendJob *) data;
-	const gchar *changelog;
-	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data (job);
+	guint		i;
+	guint		len;
+	const gchar    *package_id;
+	PkBackendJob   *job = (PkBackendJob *) data;
+	const gchar    *changelog;
+	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data(job);
 
 	/* dummy */
 	changelog = "**Thu Mar 12 2009** Adam Jackson <ajax at redhat.com> 1.6.0-13\n"
-		    "- xselinux-1.6.0-selinux-nlfd.patch: Acquire the netlink socket from selinux,\n"
-		    "  check it ourselves rather than having libselinux bang on it all the time.\n"
-		    "\n"
-		    "**Wed Mar 11 2009** Adam Jackson <ajax at redhat.com> 1.6.0-10\n"
-		    "- xserver-1.6.0-selinux-less.patch: Don't init selinux unless the policy\n"
-		    "  says to be an object manager.\n"
-		    "\n"
-		    "**Wed Mar 11 2009** Adam Jackson <ajax at redhat.com> 1.6.0-11\n"
-		    "- xserver-1.6.0-less-acpi-brokenness.patch: Don't build the (broken)\n"
-		    "  ACPI code.\n"
-		    "\n"
-		    "**Wed Mar 11 2009** Adam Jackson <ajax at redhat.com> 1.6.0-12\n"
-		    "- Requires: pixman >= 0.14.0\n"
-		    "\n"
-		    "**Fri Mar  6 2009** Adam Jackson <ajax at redhat.com> 1.6.0-8\n"
-		    "- xserver-1.6.0-primary.patch: Really, only look at VGA devices. (#488869)\n";
+		"- xselinux-1.6.0-selinux-nlfd.patch: Acquire the netlink socket from selinux,\n"
+		"  check it ourselves rather than having libselinux bang on it all the time.\n"
+		"\n"
+		"**Wed Mar 11 2009** Adam Jackson <ajax at redhat.com> 1.6.0-10\n"
+		"- xserver-1.6.0-selinux-less.patch: Don't init selinux unless the policy\n"
+		"  says to be an object manager.\n"
+		"\n"
+		"**Wed Mar 11 2009** Adam Jackson <ajax at redhat.com> 1.6.0-11\n"
+		"- xserver-1.6.0-less-acpi-brokenness.patch: Don't build the (broken)\n"
+		"  ACPI code.\n"
+		"\n"
+		"**Wed Mar 11 2009** Adam Jackson <ajax at redhat.com> 1.6.0-12\n"
+		"- Requires: pixman >= 0.14.0\n"
+		"\n"
+		"**Fri Mar  6 2009** Adam Jackson <ajax at redhat.com> 1.6.0-8\n"
+		"- xserver-1.6.0-primary.patch: Really, only look at VGA devices. (#488869)\n";
 
 	/* each one has a different detail for testing */
-	pk_backend_job_set_percentage (job, 0);
-	len = g_strv_length (priv->package_ids);
-	for (i=0; i<len; i++) {
-		const gchar *to_array1[] = { NULL, NULL, NULL };
-		const gchar *to_array2[] = { NULL, NULL, NULL };
-		const gchar *to_array3[] = { NULL, NULL, NULL };
-		const gchar *to_array4[] = { NULL, NULL, NULL };
+	pk_backend_job_set_percentage(job, 0);
+	len = g_strv_length(priv->package_ids);
+	for (i = 0; i < len; i++) {
+		const gchar    *to_array1[] = {NULL, NULL, NULL};
+		const gchar    *to_array2[] = {NULL, NULL, NULL};
+		const gchar    *to_array3[] = {NULL, NULL, NULL};
+		const gchar    *to_array4[] = {NULL, NULL, NULL};
 		package_id = priv->package_ids[i];
-		if (g_strcmp0 (package_id, "powertop;1.8-1.fc8;i386;fedora") == 0) {
+		if (g_strcmp0(package_id, "powertop;1.8-1.fc8;i386;fedora") == 0) {
 			to_array1[0] = "powertop;1.7-1.fc8;i386;installed";
 			to_array2[0] = "http://www.distro-update.org/page?moo";
 			to_array3[0] = "http://bgzilla.fd.org/result.php?#12344";
-			pk_backend_job_update_detail (job, package_id,
-						      (gchar**) to_array1,
-						      NULL,
-						      (gchar**) to_array2,
-						      (gchar**) to_array3,
-						      NULL,
-						      PK_RESTART_ENUM_NONE,
-						      "Update to newest upstream source",
-						      changelog, PK_UPDATE_STATE_ENUM_STABLE,
-						      "2009-11-17T09:19:00", "2009-11-19T09:19:00");
-		} else if (g_strcmp0 (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0) {
+			pk_backend_job_update_detail(job, package_id,
+						     (gchar **) to_array1,
+						     NULL,
+						     (gchar **) to_array2,
+						     (gchar **) to_array3,
+						     NULL,
+						     PK_RESTART_ENUM_NONE,
+					 "Update to newest upstream source",
+				     changelog, PK_UPDATE_STATE_ENUM_STABLE,
+			      "2009-11-17T09:19:00", "2009-11-19T09:19:00");
+		} else if (g_strcmp0(package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0) {
 			to_array1[0] = "kernel;2.6.22-0.104.rc3.git6.fc8;i386;installed";
 			to_array1[1] = "kernel;2.6.22-0.105.rc3.git7.fc8;i386;installed";
 			to_array2[0] = "http://www.distro-update.org/page?moo";
 			to_array3[0] = "http://bgzilla.fd.org/result.php?#12344";
 			to_array3[1] = "http://bgzilla.gnome.org/result.php?#9876";
 			to_array4[0] = "http://nvd.nist.gov/nvd.cfm?cvename=CVE-2007-3381;CVE-2007-3381";
-			pk_backend_job_update_detail (job, package_id,
-						      (gchar**) to_array1,
-						      NULL,
-						      (gchar**) to_array2,
-						      (gchar**) to_array3,
-						      (gchar**) to_array4,
-						      PK_RESTART_ENUM_SYSTEM,
-						      "Update to newest upstream version.\n"
-						      "* This should fix many driver bugs when using nouveau\n"
-						      " * This also introduces the new `frobnicator` driver for *vibrating* rabbit hardware.",
-						      changelog,
-						      PK_UPDATE_STATE_ENUM_UNSTABLE,
-						      "2008-06-28T09:19:00",
-						      NULL);
-		} else if (g_strcmp0 (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0) {
+			pk_backend_job_update_detail(job, package_id,
+						     (gchar **) to_array1,
+						     NULL,
+						     (gchar **) to_array2,
+						     (gchar **) to_array3,
+						     (gchar **) to_array4,
+						     PK_RESTART_ENUM_SYSTEM,
+				      "Update to newest upstream version.\n"
+						     "* This should fix many driver bugs when using nouveau\n"
+						     " * This also introduces the new `frobnicator` driver for *vibrating* rabbit hardware.",
+						     changelog,
+					      PK_UPDATE_STATE_ENUM_UNSTABLE,
+						     "2008-06-28T09:19:00",
+						     NULL);
+		} else if (g_strcmp0(package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0) {
 			to_array1[0] = "gtkhtml2;2.18.1-22.fc8;i386;installed";
 			to_array2[0] = "http://www.distro-update.org/page?moo";
 			to_array3[0] = "http://bgzilla.gnome.org/result.php?#9876";
-			pk_backend_job_update_detail (job, package_id,
-						      (gchar**) to_array1,
-						      NULL,
-						      (gchar**) to_array2,
-						      (gchar**) to_array3,
-						      NULL,
-						      PK_RESTART_ENUM_SESSION,
-						      "Update to latest *whizz* **bang** version\n"
-						      "* support this new thing\n"
-						      "* something else\n"
-						      "- and that new thing",
-						      changelog,
-						      PK_UPDATE_STATE_ENUM_UNKNOWN,
-						      "2008-07-25T09:19:00",
-						      NULL);
+			pk_backend_job_update_detail(job, package_id,
+						     (gchar **) to_array1,
+						     NULL,
+						     (gchar **) to_array2,
+						     (gchar **) to_array3,
+						     NULL,
+						     PK_RESTART_ENUM_SESSION,
+			       "Update to latest *whizz* **bang** version\n"
+						"* support this new thing\n"
+						     "* something else\n"
+						     "- and that new thing",
+						     changelog,
+					       PK_UPDATE_STATE_ENUM_UNKNOWN,
+						     "2008-07-25T09:19:00",
+						     NULL);
 
-		} else if (g_strcmp0 (package_id, "vino;2.24.2.fc9;i386;fedora") == 0) {
+		} else if (g_strcmp0(package_id, "vino;2.24.2.fc9;i386;fedora") == 0) {
 			to_array1[0] = "vino;2.24.1.fc9;i386;fedora";
-			pk_backend_job_update_detail (job, package_id,
-						      (gchar**) to_array1,
-						      NULL,
-						      NULL,
-						      NULL,
-						      NULL,
-						      PK_RESTART_ENUM_NONE,
-						      "Cannot get update as update conflics with vncviewer",
-						      changelog,
-						      PK_UPDATE_STATE_ENUM_UNKNOWN,
-						      "2008-07-25",
-						      NULL);
+			pk_backend_job_update_detail(job, package_id,
+						     (gchar **) to_array1,
+						     NULL,
+						     NULL,
+						     NULL,
+						     NULL,
+						     PK_RESTART_ENUM_NONE,
+						     "Cannot get update as update conflics with vncviewer",
+						     changelog,
+					       PK_UPDATE_STATE_ENUM_UNKNOWN,
+						     "2008-07-25",
+						     NULL);
 		} else {
 			/* signal to UI */
-			pk_backend_job_error_code (job,
-						   PK_ERROR_ENUM_INTERNAL_ERROR,
-						   "the package update detail was not found for %s",
-						   package_id);
+			pk_backend_job_error_code(job,
+					       PK_ERROR_ENUM_INTERNAL_ERROR,
+			   "the package update detail was not found for %s",
+						  package_id);
 		}
 	}
-	pk_backend_job_set_percentage (job, 100);
-	pk_backend_job_finished (job);
+	pk_backend_job_set_percentage(job, 100);
+	pk_backend_job_finished(job);
 	job_data->signal_timeout = 0;
 	return FALSE;
 }
@@ -422,46 +430,46 @@
  * pk_backend_get_update_detail:
  */
 void
-pk_backend_get_update_detail (PkBackend *backend, PkBackendJob *job, gchar **package_ids)
+pk_backend_get_update_detail(PkBackend * backend, PkBackendJob * job, gchar ** package_ids)
 {
-	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data (job);
-	pk_backend_job_set_status (job, PK_STATUS_ENUM_QUERY);
+	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data(job);
+	pk_backend_job_set_status(job, PK_STATUS_ENUM_QUERY);
 	priv->package_ids = package_ids;
-	job_data->signal_timeout = g_timeout_add (500, pk_backend_get_update_detail_timeout, job);
+	job_data->signal_timeout = g_timeout_add(500, pk_backend_get_update_detail_timeout, job);
 }
 
 /**
  * pk_backend_get_updates_timeout:
  **/
-static gboolean
-pk_backend_get_updates_timeout (gpointer data)
+static		gboolean
+pk_backend_get_updates_timeout(gpointer data)
 {
-	PkBackendJob *job = (PkBackendJob *) data;
-	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data (job);
+	PkBackendJob   *job = (PkBackendJob *) data;
+	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data(job);
 
 	if (priv->use_blocked) {
 		if (!priv->updated_powertop && !priv->updated_kernel && !priv->updated_gtkhtml) {
-			pk_backend_job_package (job, PK_INFO_ENUM_BLOCKED,
-						"vino;2.24.2.fc9;i386;fedora",
-						"Remote desktop server for the desktop");
+			pk_backend_job_package(job, PK_INFO_ENUM_BLOCKED,
+					       "vino;2.24.2.fc9;i386;fedora",
+				   "Remote desktop server for the desktop");
 		}
 	}
 	if (!priv->updated_powertop) {
-		pk_backend_job_package (job, PK_INFO_ENUM_NORMAL,
-					"powertop;1.8-1.fc8;i386;fedora",
-					"Power consumption monitor");
+		pk_backend_job_package(job, PK_INFO_ENUM_NORMAL,
+				       "powertop;1.8-1.fc8;i386;fedora",
+				       "Power consumption monitor");
 	}
 	if (!priv->updated_kernel) {
-		pk_backend_job_package (job, PK_INFO_ENUM_BUGFIX,
-					"kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed",
-					"The Linux kernel (the core of the Linux operating system)");
+		pk_backend_job_package(job, PK_INFO_ENUM_BUGFIX,
+			  "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed",
+		"The Linux kernel (the core of the Linux operating system)");
 	}
 	if (!priv->updated_gtkhtml) {
-		pk_backend_job_package (job, PK_INFO_ENUM_SECURITY,
-					"gtkhtml2;2.19.1-4.fc8;i386;fedora",
-					"An HTML widget for GTK+ 2.0");
+		pk_backend_job_package(job, PK_INFO_ENUM_SECURITY,
+				       "gtkhtml2;2.19.1-4.fc8;i386;fedora",
+				       "An HTML widget for GTK+ 2.0");
 	}
-	pk_backend_job_finished (job);
+	pk_backend_job_finished(job);
 	job_data->signal_timeout = 0;
 	return FALSE;
 }
@@ -470,227 +478,219 @@
  * pk_backend_get_updates:
  */
 void
-pk_backend_get_updates (PkBackend *backend, PkBackendJob *job, PkBitfield filters)
+pk_backend_get_updates(PkBackend * backend, PkBackendJob * job, PkBitfield filters)
 {
-	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data (job);
-	pk_backend_job_set_status (job, PK_STATUS_ENUM_QUERY);
-	pk_backend_job_set_percentage (job, PK_BACKEND_PERCENTAGE_INVALID);
+	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data(job);
+	pk_backend_job_set_status(job, PK_STATUS_ENUM_QUERY);
+	pk_backend_job_set_percentage(job, PK_BACKEND_PERCENTAGE_INVALID);
 	/* check network state */
-	if (!pk_backend_is_online (backend)) {
-		pk_backend_job_error_code (job, PK_ERROR_ENUM_NO_NETWORK, "Cannot check when offline");
-		pk_backend_job_finished (job);
+	if (!pk_backend_is_online(backend)) {
+		pk_backend_job_error_code(job, PK_ERROR_ENUM_NO_NETWORK, "Cannot check when offline");
+		pk_backend_job_finished(job);
 		return;
 	}
-	job_data->signal_timeout = g_timeout_add (1000, pk_backend_get_updates_timeout, job);
+	job_data->signal_timeout = g_timeout_add(1000, pk_backend_get_updates_timeout, job);
 }
 
 /**
  * pk_backend_install_thread:
  */
 static void
-pk_backend_install_thread (PkBackendJob *job, GVariant *params, gpointer user_data)
+pk_backend_install_thread(PkBackendJob * job, GVariant * params, gpointer user_data)
 {
-	gchar **package_ids;
-	PkBitfield transaction_flags;
-	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data (job);
-
-	g_variant_get (params, "(t^a&s)",
-		       &transaction_flags,
-		       &package_ids);
+	gchar         **package_ids;
+	PkBitfield	transaction_flags;
+	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data(job);
+
+	g_variant_get(params, "(t^a&s)",
+		      &transaction_flags,
+		      &package_ids);
 
 	while (TRUE) {
 
 		/* check cancelled */
-		if (g_cancellable_is_cancelled (job_data->cancellable)) {
-			pk_backend_job_error_code (job,
-						   PK_ERROR_ENUM_TRANSACTION_CANCELLED,
-						   "The task was stopped successfully");
-			pk_backend_job_finished (job);
+		if (g_cancellable_is_cancelled(job_data->cancellable)) {
+			pk_backend_job_error_code(job,
+					PK_ERROR_ENUM_TRANSACTION_CANCELLED,
+				       "The task was stopped successfully");
+			pk_backend_job_finished(job);
 			break;
 		}
-
 		if (job_data->progress_percentage == 100) {
-			pk_backend_job_finished (job);
+			pk_backend_job_finished(job);
 			break;
 		}
-
 		if (job_data->progress_percentage == 30) {
-			pk_backend_job_set_allow_cancel (job, FALSE);
-			pk_backend_job_package (job, PK_INFO_ENUM_INSTALLING,
-						"gtkhtml2;2.19.1-4.fc8;i386;fedora",
-						"An HTML widget for GTK+ 2.0");
-			pk_backend_job_set_status (job, PK_STATUS_ENUM_INSTALL);
+			pk_backend_job_set_allow_cancel(job, FALSE);
+			pk_backend_job_package(job, PK_INFO_ENUM_INSTALLING,
+					"gtkhtml2;2.19.1-4.fc8;i386;fedora",
+					     "An HTML widget for GTK+ 2.0");
+			pk_backend_job_set_status(job, PK_STATUS_ENUM_INSTALL);
 		}
-
 		if (job_data->progress_percentage == 50) {
-			pk_backend_job_package (job, PK_INFO_ENUM_INSTALLING,
-						"gtkhtml2-devel;2.19.1-0.fc8;i386;fedora",
-						"Devel files for gtkhtml");
+			pk_backend_job_package(job, PK_INFO_ENUM_INSTALLING,
+				  "gtkhtml2-devel;2.19.1-0.fc8;i386;fedora",
+					       "Devel files for gtkhtml");
 			/* this duplicate package should be ignored */
-			pk_backend_job_package (job, PK_INFO_ENUM_INSTALLING,
-						"gtkhtml2-devel;2.19.1-0.fc8;i386;fedora", NULL);
-			pk_backend_job_set_status (job, PK_STATUS_ENUM_INSTALL);
+			pk_backend_job_package(job, PK_INFO_ENUM_INSTALLING,
+			   "gtkhtml2-devel;2.19.1-0.fc8;i386;fedora", NULL);
+			pk_backend_job_set_status(job, PK_STATUS_ENUM_INSTALL);
 		}
-
 		job_data->progress_percentage += 1;
-		pk_backend_job_set_percentage (job, job_data->progress_percentage);
+		pk_backend_job_set_percentage(job, job_data->progress_percentage);
 
 		/* sleep 100 milliseconds */
-		g_usleep (100000);
+		g_usleep(100000);
 	}
 
 	/* unlock backend again */
 	priv->fake_db_locked = FALSE;
-	pk_backend_job_set_locked (job, FALSE);
+	pk_backend_job_set_locked(job, FALSE);
 }
 
 /**
  * pk_backend_install_packages:
  */
 void
-pk_backend_install_packages (PkBackend *backend, PkBackendJob *job, PkBitfield transaction_flags, gchar **package_ids)
+pk_backend_install_packages(PkBackend * backend, PkBackendJob * job, PkBitfield transaction_flags, gchar ** package_ids)
 {
-	const gchar *license_agreement;
-	const gchar *eula_id;
-	gboolean has_eula;
-	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data (job);
+	const gchar    *license_agreement;
+	const gchar    *eula_id;
+	gboolean	has_eula;
+	PkBackendDummyJobData *job_data = pk_backend_job_get_user_data(job);
 
 	/* simulate */
-	if (pk_bitfield_contain (transaction_flags, PK_TRANSACTION_FLAG_ENUM_SIMULATE)) {
-		pk_backend_job_set_status (job, PK_STATUS_ENUM_DEP_RESOLVE);
+	if (pk_bitfield_contain(transaction_flags, PK_TRANSACTION_FLAG_ENUM_SIMULATE)) {
+		pk_backend_job_set_status(job, PK_STATUS_ENUM_DEP_RESOLVE);
 
-		pk_backend_job_package (job, PK_INFO_ENUM_REMOVING,
-					"powertop;1.8-1.fc8;i386;fedora", "Power consumption monitor");
+		pk_backend_job_package(job, PK_INFO_ENUM_REMOVING,
+				       "powertop;1.8-1.fc8;i386;fedora", "Power consumption monitor");
 
-		pk_backend_job_package (job, PK_INFO_ENUM_INSTALLING,
-					"gtk2;2.11.6-6.fc8;i386;fedora", "GTK+ Libraries for GIMP");
+		pk_backend_job_package(job, PK_INFO_ENUM_INSTALLING,
+		"gtk2;2.11.6-6.fc8;i386;fedora", "GTK+ Libraries for GIMP");
 
-		pk_backend_job_package (job, PK_INFO_ENUM_UPDATING,
-					"lib7;7.0.1-6.fc13;i386;fedora", "C Libraries");
+		pk_backend_job_package(job, PK_INFO_ENUM_UPDATING,
+			    "lib7;7.0.1-6.fc13;i386;fedora", "C Libraries");
 
-		pk_backend_job_package (job, PK_INFO_ENUM_REINSTALLING,
-					"libssl;3.5.7-2.fc13;i386;fedora", "SSL Libraries");
+		pk_backend_job_package(job, PK_INFO_ENUM_REINSTALLING,
+			"libssl;3.5.7-2.fc13;i386;fedora", "SSL Libraries");
 
-		pk_backend_job_package (job, PK_INFO_ENUM_DOWNGRADING,
-					"kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed", "The Linux kernel (the core of the Linux operating system)");
+		pk_backend_job_package(job, PK_INFO_ENUM_DOWNGRADING,
+				       "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed", "The Linux kernel (the core of the Linux operating system)");
 
-		pk_backend_job_package (job, PK_INFO_ENUM_UPDATING,
-					"gtkhtml2;2.19.1-4.fc8;i386;fedora", "An HTML widget for GTK+ 2.0");
+		pk_backend_job_package(job, PK_INFO_ENUM_UPDATING,
+				       "gtkhtml2;2.19.1-4.fc8;i386;fedora", "An HTML widget for GTK+ 2.0");
 
-		pk_backend_job_finished (job);
+		pk_backend_job_finished(job);
 		return;
 	}
-
-	if (g_strcmp0 (package_ids[0], "vips-doc;7.12.4-2.fc8;noarch;linva") == 0) {
+	if (g_strcmp0(package_ids[0], "vips-doc;7.12.4-2.fc8;noarch;linva") == 0) {
 		if (priv->use_gpg && !priv->has_signature) {
-			pk_backend_job_repo_signature_required (job, package_ids[0], "updates",
-								"http://example.com/gpgkey",
-								"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_job_error_code (job, PK_ERROR_ENUM_GPG_FAILURE,
-						   "GPG signed package could not be verified");
-			pk_backend_job_finished (job);
+			pk_backend_job_repo_signature_required(job, package_ids[0], "updates",
+						"http://example.com/gpgkey",
+				     "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_job_error_code(job, PK_ERROR_ENUM_GPG_FAILURE,
+				"GPG signed package could not be verified");
+			pk_backend_job_finished(job);
 			return;
 		}
 		eula_id = "eula_hughsie_dot_com";
-		has_eula = pk_backend_is_eula_valid (backend, eula_id);
+		has_eula = pk_backend_is_eula_valid(backend, eula_id);
 		if (priv->use_eula && !has_eula) {
 			license_agreement = "Narrator: In A.D. 2101, war was beginning.\n"
-					    "Captain: What happen ?\n"
-					    "Mechanic: Somebody set up us the bomb.\n\n"
-					    "Operator: We get signal.\n"
-					    "Captain: What !\n"
-					    "Operator: Main screen turn on.\n"
-					    "Captain: It's you !!\n"
-					    "CATS: How are you gentlemen !!\n"
-					    "CATS: All your base are belong to us.\n"
-					    "CATS: You are on the way to destruction.\n\n"
-					    "Captain: What you say !!\n"
-					    "CATS: You have no chance to survive make your time.\n"
-					    "CATS: Ha Ha Ha Ha ....\n\n"
-					    "Operator: Captain!! *\n"
-					    "Captain: Take off every 'ZIG' !!\n"
-					    "Captain: You know what you doing.\n"
-					    "Captain: Move 'ZIG'.\n"
-					    "Captain: For great justice.\n";
-			pk_backend_job_eula_required (job, eula_id, package_ids[0],
-						      "CATS Inc.", license_agreement);
-			pk_backend_job_error_code (job, PK_ERROR_ENUM_NO_LICENSE_AGREEMENT,
-						   "licence not installed so cannot install");
-			pk_backend_job_finished (job);
+				"Captain: What happen ?\n"
+				"Mechanic: Somebody set up us the bomb.\n\n"
+				"Operator: We get signal.\n"
+				"Captain: What !\n"
+				"Operator: Main screen turn on.\n"
+				"Captain: It's you !!\n"
+				"CATS: How are you gentlemen !!\n"
+				"CATS: All your base are belong to us.\n"
+				"CATS: You are on the way to destruction.\n\n"
+				"Captain: What you say !!\n"
+				"CATS: You have no chance to survive make your time.\n"
+				"CATS: Ha Ha Ha Ha ....\n\n"
+				"Operator: Captain!! *\n"
+				"Captain: Take off every 'ZIG' !!\n"
+				"Captain: You know what you doing.\n"
+				"Captain: Move 'ZIG'.\n"
+				"Captain: For great justice.\n";
+			pk_backend_job_eula_required(job, eula_id, package_ids[0],
+					    "CATS Inc.", license_agreement);
+			pk_backend_job_error_code(job, PK_ERROR_ENUM_NO_LICENSE_AGREEMENT,
+				 "licence not installed so cannot install");
+			pk_backend_job_finished(job);
 			return;
 		}
 		if (priv->use_media) {
 			priv->use_media = FALSE;
-			pk_backend_job_media_change_required (job, PK_MEDIA_TYPE_ENUM_DVD, "linux-disk-1of7", "Linux Disc 1 of 7");

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-soc-all mailing list