[PackageKit-commit] packagekit: Branch 'master' - 39 commits

Richard Hughes hughsient at kemper.freedesktop.org
Mon Sep 29 08:16:54 PDT 2008


 NEWS                             |   57 +++++
 backends/apt/aptDBUSBackend.py   |  156 +++++++++------
 backends/smart/packagekit        |    1 
 backends/smart/smartBackend.py   |   14 +
 backends/yum/yumBackend.py       |   23 +-
 backends/yum/yumComps.py         |   34 ++-
 configure.ac                     |    2 
 contrib/PackageKit.spec.in       |    2 
 data/Makefile.am                 |    2 
 data/packagekit.pc.in            |    2 
 docs/html/pk-authors.html        |   20 +
 docs/html/pk-download.html       |    3 
 libpackagekit/egg-obj-list.c     |  152 +++++++++++++--
 libpackagekit/egg-obj-list.h     |    7 
 libpackagekit/pk-package-ids.c   |   15 +
 libpackagekit/pk-package-ids.h   |    1 
 po/ca.po                         |  393 +++++++++++++++++++++++++++------------
 python/packagekit/backend.py     |    1 
 python/packagekit/pylint.sh      |    2 
 src/Makefile.am                  |    4 
 src/egg-obj-list.c               |    1 
 src/egg-obj-list.h               |    1 
 src/egg-string-list.c            |  205 ++++++++++++++++++++
 src/egg-string-list.h            |   63 ++++++
 src/pk-interface-transaction.xml |  370 ++++++++++++++++++------------------
 src/pk-interface.xml             |   24 +-
 src/pk-refresh.c                 |  173 ++++++++++++++---
 src/pk-self-test.c               |    5 
 28 files changed, 1300 insertions(+), 433 deletions(-)

New commits:
commit 481d1535f6e7671931a7ede37a12fbc49af1f9fa
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 16:13:00 2008 +0100

    Release version 0.3.5

diff --git a/NEWS b/NEWS
index 45a27ee..c0fef98 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,60 @@
+Version 0.3.5
+~~~~~~~~~~~~~~
+Released: 2008-09-29
+
+Translations:
+ - Add new Malay translation (Sharuzzaman Ahmat Raslan)
+ - Updated Czech translation (Adam Pribyl)
+ - Updated Polish translation (Piotr DrÄ…g)
+ - Updated Catalan translation (Xavier Conde)
+
+New Features:
+ - Add new API so we can avoid loading data when we are just writing (Richard Hughes)
+ - Add a helper which can be used by GStreamer to install codecs.
+   The conversion code was written by Bastien Nocera (Richard Hughes)
+ - Add an abstract filter object as backends keep getting this wrong (Richard Hughes)
+ - Keep an array of modification times for the desktop files so we don't force
+   processing each unchanged one when we do RefreshCache. Fixes fd#17817 (Richard Hughes)
+
+Bugfixes:
+ - Turn off synchronous fsync when using PkExtra as the data isn't valuable (Richard Hughes)
+ - Don't send ::Finished() when the script exits because of a dispatcher exit (Richard Hughes)
+ - When we have more than one transaction queued, don't try to run them all at once (Richard Hughes)
+ - Check if an instance is already running (Richard Hughes)
+ - Finish a cached transaction in an idle loop (Richard Hughes)
+ - Fix up a couple of potential crashers in PkControl if SetLocale fails (Richard Hughes)
+ - Remove all the funny '^','|',<tab> seporators and make the delimiters all the same (Richard Hughes)
+ - libpackagekit needs sqlite, so mark it as such in the pkgconfig file (Richard Hughes)
+ - Python client: add the right type to obj vars to the Package object (Tim Lauridsen)
+ - Python client: store the whole info in PackageKitPackage (Sebastian Heinlein)
+ - Python client: store 'free' strings as unicodes instead of utf-8 encoded (Sebastian Heinlein)
+
+Backends:
+ - apt: Add a decorator which cleans up the system cache lock (Sebastian Heinlein)
+ - apt: Check if the in memory cache is insync with the file cache (Sebastian Heinlein)
+ - apt: Enhance the test script to a full package client (Sebastian Heinlein)
+ - apt: Do not fork the whole backend to only run dpkg (Sebastian Heinlein)
+ - apt: Use openpty() to create a fd which can be used for stdin and stdout (Sebastian Heinlein)
+ - apt: Do not require to lock the cache before running dpkg (Sebastian Heinlein)
+ - apt: Scan for debian bugs and cves referred to in the changelog (Sebastian Heinlein)
+ - apt: Fix config file prompts in direct dpkg calls and add a small sleep (Sebastian Heinlein)
+ - apt: Instead of catching and answering a config file prompt just set the dpkg options --force-confdef and --force-confold (Sebastian Heinlein)
+ - alpm: Added support for new pacman, resolver stuff changed and moved functions to another thread (Valeriy Lyasotskiy)
+ - smart: Restore the missing installed collections (Anders F Bjorklund)
+ - smart: Always use the dispatcher (Anders F Bjorklund)
+ - smart: Look for apt metapackages as well as yum/yast (Anders F Bjorklund)
+ - pisi: Convert the backend to using a dispatcher (Richard Hughes)
+ - yum: Added set-locale support and return translated collection name & decription (Tim Lauridsen)
+ - yum: Use the LANG environment var to set language of group names & decriptions (Tim Lauridsen)
+ - yum: Make the yum comps db use a version, so we can change the schema in the future (Tim Lauridsen)
+ - yum: Fix the name of the enum when no mirrors are found (Richard Hughes)
+ - yum: Fix up a load of issues with rpmlint in yumBackend (Richard Hughes)
+ - yum: Make the check for additional deps much faster in the specific case where we can emulate a transaction (Richard Hughes)
+ - yum: Use the new PackagekitFilter abstract object (Richard Hughes)
+ - yum: Always enforce a finished call after ErrorCode to avoid a daemon warning (Richard Hughes)
+ - yum: Fix getting the update list after we installed updates (Richard Hughes)
+ - zypp: Fix returning bogus packages by setting ignoreAlreadyRecommended (Scott Reeves)
+
 Version 0.3.4
 ~~~~~~~~~~~~~~
 Released: 2008-09-22
diff --git a/configure.ac b/configure.ac
index c91359f..1af9c41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ DEVELOPMENT_RELEASE=no
 # REVISION	If the API and ABI remains the same, but bugs are fixed.
 # AGE		If libpackagekit can be linked into executables which can be
 # 		built with previous versions of this library. Don't use.
-LT_CURRENT=7
+LT_CURRENT=8
 LT_REVISION=0
 LT_AGE=0
 AC_SUBST(LT_CURRENT)
diff --git a/docs/html/pk-download.html b/docs/html/pk-download.html
index 7f985ca..2ed4c7b 100644
--- a/docs/html/pk-download.html
+++ b/docs/html/pk-download.html
@@ -75,6 +75,7 @@ Releases are normally once every 1-2 weeks.
 <tr><td>0.3.2</td><td></td><td>2008-09-08</td></tr>
 <tr><td>0.3.3</td><td></td><td>2008-09-16</td></tr>
 <tr><td>0.3.4</td><td></td><td>2008-09-22</td></tr>
+<tr><td>0.3.5</td><td></td><td>2008-09-29</td></tr>
 </table>
 <h3>
 ABI Stable Versions:
commit dc719aa796e9ce3aec2fb70da05fd744ac6f8a74
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 15:49:48 2008 +0100

    trivial: remove debugging from yumComps

diff --git a/backends/yum/yumComps.py b/backends/yum/yumComps.py
index d03e094..2b607c2 100755
--- a/backends/yum/yumComps.py
+++ b/backends/yum/yumComps.py
@@ -224,7 +224,6 @@ class yumComps:
 
     def _make_database_tables(self):
         ''' Setup a database for yum category and group information'''
-        print "building new databases"
         try: # kill the old db
             self.connection.close()
             os.unlink(self.db) # kill the db
@@ -325,7 +324,6 @@ class yumComps:
 
 if __name__ == "__main__":
     import yum
-    import os
     _yb = yum.YumBase()
     _db = "./packagekit-groups.sqlite"
     comps = yumComps(_yb, _db)
commit 1223271e6710789cf9a2322ea347aab88d37dbaf
Merge: 5ce670e... 58c9a65...
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 15:47:41 2008 +0100

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

commit 58c9a6505ff3d04e265d9b97d40bc4234ac006aa
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Mon Sep 29 16:50:55 2008 +0200

    yum: added missing import

diff --git a/backends/yum/yumComps.py b/backends/yum/yumComps.py
index f8016b0..d03e094 100755
--- a/backends/yum/yumComps.py
+++ b/backends/yum/yumComps.py
@@ -20,6 +20,7 @@
 
 from packagekit.enums import *
 import sqlite3 as sqlite
+import os
 
 groupMap = {
 'desktops;gnome-desktop'                      : GROUP_DESKTOP_GNOME,
commit 5ce670e46c98abb1577aafe025c6d2c4b553efd8
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 15:45:13 2008 +0100

    bugfix: libpackagekit needs sqlite, so mark it as such in the pkgconfig file

diff --git a/data/packagekit.pc.in b/data/packagekit.pc.in
index ebe57ff..8bd49f4 100644
--- a/data/packagekit.pc.in
+++ b/data/packagekit.pc.in
@@ -7,7 +7,7 @@ Name: packagekit
 Description: PackageKit is a system daemon for installing stuff.
 Version: @VERSION@
 Requires.private: dbus-1, gthread-2.0
-Requires: glib-2.0, gobject-2.0
+Requires: glib-2.0, gobject-2.0, sqlite3
 Libs: -L${libdir} -lpackagekit
 Cflags: -I${includedir}/packagekit
 
commit e6cb406d0403554a86a766bd2b3330052eca53e7
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 15:35:13 2008 +0100

    trivial: pylint fix

diff --git a/backends/yum/yumComps.py b/backends/yum/yumComps.py
index 6187ee5..f8016b0 100755
--- a/backends/yum/yumComps.py
+++ b/backends/yum/yumComps.py
@@ -213,7 +213,7 @@ class yumComps:
                 break
             # Check if we have the right DB version
             if not version or version != __DB_VER__:
-                print "Wrong database versions : %s needs %s " % (version,__DB_VER__)
+                print "Wrong database versions : %s needs %s " % (version, __DB_VER__)
                 self._make_database_tables()
         except Exception, e:
             # We couldn't get the version, so create a new database
commit 439f034e4565e352934f4da224cd6af73e9f4b3c
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Mon Sep 29 16:15:22 2008 +0200

    yum: make the yum comps db use a version, so we can change the schema in the future

diff --git a/backends/yum/yumComps.py b/backends/yum/yumComps.py
index bcd9975..6187ee5 100755
--- a/backends/yum/yumComps.py
+++ b/backends/yum/yumComps.py
@@ -183,6 +183,7 @@ groupMap = {
 'rpmfusion_nonfree;base'                      : GROUP_SYSTEM
 }
 
+__DB_VER__ = '1'
 class yumComps:
 
     def __init__(self, yumbase, db = None):
@@ -203,15 +204,39 @@ class yumComps:
             print 'cannot connect to database %s: %s' % (self.db, str(e))
             return False
 
-        # test if we can get a group for a common package, create if fail
         try:
-            self.cursor.execute('SELECT group_enum FROM groups WHERE name = ?;', ['hal'])
+            version = None
+            # Get the current database version
+            self.cursor.execute('SELECT version FROM version')
+            for row in self.cursor:
+                version = str(row[0])
+                break
+            # Check if we have the right DB version
+            if not version or version != __DB_VER__:
+                print "Wrong database versions : %s needs %s " % (version,__DB_VER__)
+                self._make_database_tables()
         except Exception, e:
-            self.cursor.execute('CREATE TABLE groups (name TEXT, category TEXT, groupid TEXT, group_enum TEXT, pkgtype Text);')
-            self.refresh()
+            # We couldn't get the version, so create a new database
+            self._make_database_tables()
 
         return True
 
+    def _make_database_tables(self):
+        ''' Setup a database for yum category and group information'''
+        print "building new databases"
+        try: # kill the old db
+            self.connection.close()
+            os.unlink(self.db) # kill the db
+            self.connection = sqlite.connect(self.db)
+            self.cursor = self.connection.cursor()
+        except Exception, e:
+            print e
+        self.cursor.execute('CREATE TABLE groups (name TEXT, category TEXT, groupid TEXT, group_enum TEXT, pkgtype Text);')
+        self.cursor.execute('CREATE TABLE version (version TEXT);')
+        self.cursor.execute('INSERT INTO version values(?);', __DB_VER__)
+        self.connection.commit()
+        self.refresh()
+
     def _add_db(self, name, category, groupid, pkgroup, pkgtype):
         ''' add an item into the database '''
         self.cursor.execute('INSERT INTO groups values(?, ?, ?, ?, ?);', (name, category, groupid, pkgroup, pkgtype))
commit ee434ef6ddfbd6d9a8b6b70e28b0c3297b1fa3a0
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 14:02:31 2008 +0100

    yum: fix getting the update list after we installed updates
    
    yum 'helpfully' keeps an array of updates available, so if we:
    1. open a dispatcher with get-updates
    2. install an updates with update-packages
    3. get the update list with get-updates
    then the package that was just updated is marked as an update

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 90f85a6..b70ad09 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1538,6 +1538,9 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         self.percentage(None)
         self.status(STATUS_INFO)
 
+        # yum 'helpfully' keeps an array of updates available
+        self.yumbase._up = None
+
         fltlist = filters.split(';')
         package_list = []
         pkgfilter = YumFilter(fltlist)
commit 33a9bfd87552f83bc08e1869a62c3289da180eaf
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 13:51:38 2008 +0100

    yum: always enforce a finished call after ErrorCode to avoid a daemon warning

diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index e7934cf..c12b163 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
@@ -80,6 +80,7 @@ class PackageKitBaseBackend:
         @param exit: exit application with rc = 1, if true
         '''
         print "error\t%s\t%s" % (err, description)
+        print "finished"
         sys.stdout.flush()
         if exit:
             if self.isLocked():
commit 2cb56f8a89f47cc25d7713369c53f6d3be2c831e
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 12:42:12 2008 +0100

    feature: keep an array of mtimes for the desktop files so we don't force processing each unchanged one when we do RefreshCache. Fixes fd#17817

diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index 6b1a0f4..82eeafe 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -144,6 +144,8 @@ Summary: Install GStreamer codecs using PackageKit
 Group: Development/Libraries
 Requires: gstreamer
 Requires: PackageKit-libs = %{version}-%{release}
+Obsoletes: codeina < 0.10.1-8
+Provides:  codeina = 0.10.1-8
 
 %description gstreamer-plugin
 The PackageKit GStreamer plugin allows any Gstreamer application to install
diff --git a/src/pk-refresh.c b/src/pk-refresh.c
index 039f8c1..469081d 100644
--- a/src/pk-refresh.c
+++ b/src/pk-refresh.c
@@ -27,7 +27,12 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 
+#ifdef PK_BUILD_GIO
+  #include <gio/gio.h>
+#endif
+
 #include "egg-debug.h"
+#include "egg-string-list.h"
 
 #include "pk-refresh.h"
 #include "pk-shared.h"
@@ -243,62 +248,163 @@ out:
 }
 
 /**
- * pk_refresh_import_desktop_files:
+ * pk_refresh_import_desktop_files_get_files:
+ *
+ * Returns a list of all the files in the applicaitons directory
  **/
-gboolean
-pk_refresh_import_desktop_files (PkRefresh *refresh)
+#ifdef PK_BUILD_GIO
+static guint
+pk_refresh_get_filename_mtime (const gchar *filename)
+{
+	GFileInfo *info;
+	GFile *file;
+	GError *error = NULL;
+	GTimeVal time;
+
+	file = g_file_new_for_path (filename);
+	info = g_file_query_info (file, G_FILE_ATTRIBUTE_TIME_MODIFIED, G_FILE_QUERY_INFO_NONE, NULL, &error);
+	if (info == NULL) {
+		egg_warning ("%s", error->message);
+		g_error_free (error);
+		return 0;
+	}
+
+	/* get the mtime */
+	g_file_info_get_modification_time (info, &time);
+	g_object_unref (file);
+	g_object_unref (info);
+
+	return time.tv_sec;
+}
+#else
+static guint
+pk_refresh_get_filename_mtime (const gchar *filename)
+{
+	return 0;
+}
+#endif
+
+/**
+ * pk_refresh_import_desktop_files_get_files:
+ *
+ * Returns a list of all the files in the applicaitons directory
+ **/
+static EggStringList *
+pk_refresh_import_desktop_files_get_files (PkRefresh *refresh)
 {
 	GDir *dir;
-	guint i;
-	const gchar *name;
+	EggStringList *list;
 	GPatternSpec *pattern;
-	gboolean match;
 	gchar *filename;
-	gchar *package_name;
-	GPtrArray *array;
-	gfloat step;
-
+	gboolean match;
+	const gchar *name;
 	const gchar *directory = "/usr/share/applications";
 
-	g_return_val_if_fail (PK_IS_REFRESH (refresh), FALSE);
-
-	if (refresh->priv->backend->desc->search_file == NULL) {
-		egg_debug ("cannot search files");
-		return FALSE;
-	}
-
 	/* open directory */
 	dir = g_dir_open (directory, 0, NULL);
 	if (dir == NULL) {
 		egg_warning ("not a valid desktop dir!");
-		return FALSE;
+		return NULL;
 	}
 
-	/* use a local backend instance */
-	pk_backend_reset (refresh->priv->backend);
-	pk_refresh_emit_status_changed (refresh, PK_STATUS_ENUM_SCAN_APPLICATIONS);
-
 	/* find files */
 	pattern = g_pattern_spec_new ("*.desktop");
 	name = g_dir_read_name (dir);
-	array = g_ptr_array_new ();
+	list = egg_string_list_new ();
 	while (name != NULL) {
 		/* ITS4: ignore, not used for allocation and has to be NULL terminated */
 		match = g_pattern_match (pattern, strlen (name), name, NULL);
 		if (match) {
 			filename = g_build_filename (directory, name, NULL);
-			g_ptr_array_add (array, filename);
+			egg_obj_list_add (EGG_OBJ_LIST (list), filename);
 		}
 		name = g_dir_read_name (dir);
 	}
 	g_dir_close (dir);
 
+	return list;
+}
+
+/**
+ * pk_refresh_import_desktop_files_get_mtimes:
+ **/
+static EggStringList *
+pk_refresh_import_desktop_files_get_mtimes (const EggStringList *files)
+{
+	guint i;
+	guint mtime;
+	gchar *encode;
+	const gchar *filename;
+	EggStringList *list;
+
+	list = egg_string_list_new ();
+	for (i=0; i<EGG_OBJ_LIST(files)->len; i++) {
+		filename = egg_string_list_index (files, i);
+		mtime = pk_refresh_get_filename_mtime (filename);
+		encode = g_strdup_printf ("%s|%i|v1", filename, mtime);
+		egg_obj_list_add (EGG_OBJ_LIST (list), encode);
+		g_free (encode);
+	}
+	return list;
+}
+
+/**
+ * pk_refresh_import_desktop_files:
+ **/
+gboolean
+pk_refresh_import_desktop_files (PkRefresh *refresh)
+{
+	guint i;
+	gboolean ret;
+	gchar *package_name;
+	gfloat step;
+	EggStringList *files;
+	EggStringList *mtimes;
+	EggStringList *mtimes_old;
+	gchar *filename;
+
+	g_return_val_if_fail (PK_IS_REFRESH (refresh), FALSE);
+
+	if (refresh->priv->backend->desc->search_file == NULL) {
+		egg_debug ("cannot search files");
+		return FALSE;
+	}
+
+	/* use a local backend instance */
+	pk_backend_reset (refresh->priv->backend);
+	pk_refresh_emit_status_changed (refresh, PK_STATUS_ENUM_SCAN_APPLICATIONS);
+
+	egg_debug ("getting old desktop mtimes");
+	mtimes_old = egg_string_list_new ();
+	ret = egg_obj_list_from_file (EGG_OBJ_LIST (mtimes_old), "/var/lib/PackageKit/desktop-mtimes.txt");
+	if (!ret)
+		egg_warning ("failed to get old mtimes of desktop files");
+
+	/* get the file list */
+	files = pk_refresh_import_desktop_files_get_files (refresh);
+
+	/* get the mtimes */
+	mtimes = pk_refresh_import_desktop_files_get_mtimes (files);
+
+	/* remove old desktop files we've already processed */
+	egg_obj_list_remove_list (EGG_OBJ_LIST(mtimes), EGG_OBJ_LIST (mtimes_old));
+
+	/* shortcut, there are no files to scan */
+	if (EGG_OBJ_LIST(mtimes)->len == 0) {
+		egg_debug ("no desktop files needed to scan");
+		goto no_changes;
+	}
+
 	/* update UI */
 	pk_refresh_emit_progress_changed (refresh, 0);
-	step = 100.0f / array->len;
+	step = 100.0f / EGG_OBJ_LIST(mtimes)->len;
+
+	/* for each new package, process the desktop file */
+	for (i=0; i<EGG_OBJ_LIST(mtimes)->len; i++) {
 
-	for (i=0; i<array->len; i++) {
-		filename = g_ptr_array_index (array, i);
+		/* get the filename from the mtime encoded string */
+		filename = g_strdup (egg_string_list_index (mtimes, i));
+		g_strdelimit (filename, "|", '\0');
 
 		/* get the name */
 		package_name = pk_refresh_import_desktop_files_get_package (refresh, filename);
@@ -309,18 +415,25 @@ pk_refresh_import_desktop_files (PkRefresh *refresh)
 		else
 			egg_warning ("%s ignored, failed to get package name\n", filename);
 		g_free (package_name);
+		g_free (filename);
 
 		/* update UI */
 		pk_refresh_emit_progress_changed (refresh, i * step);
 	}
 
+	/* save new mtimes data */
+	ret = egg_obj_list_to_file (EGG_OBJ_LIST (mtimes), "/var/lib/PackageKit/desktop-mtimes.txt");
+	if (!ret)
+		egg_warning ("failed to set old mtimes of desktop files");
+
+no_changes:
 	/* update UI */
 	pk_refresh_emit_progress_changed (refresh, 100);
 	pk_refresh_emit_status_changed (refresh, PK_STATUS_ENUM_FINISHED);
 
-	g_ptr_array_foreach (array, (GFunc) g_free, NULL);
-	g_ptr_array_free (array, TRUE);
-
+	g_object_unref (files);
+	g_object_unref (mtimes);
+	g_object_unref (mtimes_old);
 	return TRUE;
 }
 
commit 62d9909cae00a3d04ef8c820911b0c99d600f362
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 12:30:32 2008 +0100

    trivial: use EggStringList in the future

diff --git a/src/Makefile.am b/src/Makefile.am
index bbd302d..f44c2b1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,6 +42,10 @@ shared_SOURCES =					\
 	egg-debug.h					\
 	egg-string.c					\
 	egg-string.h					\
+	egg-obj-list.c					\
+	egg-obj-list.h					\
+	egg-string-list.c				\
+	egg-string-list.h				\
 	egg-dbus-monitor.c				\
 	egg-dbus-monitor.h				\
 	pk-marshal.c					\
commit 614448225ad28ea0280b066151b6445c8e2f7df0
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 12:28:23 2008 +0100

    trivial: add EggStringList (superclass of EggObjList) for storing string lists

diff --git a/src/egg-obj-list.c b/src/egg-obj-list.c
new file mode 120000
index 0000000..f798b56
--- /dev/null
+++ b/src/egg-obj-list.c
@@ -0,0 +1 @@
+../libpackagekit/egg-obj-list.c
\ No newline at end of file
diff --git a/src/egg-obj-list.h b/src/egg-obj-list.h
new file mode 120000
index 0000000..4c3432b
--- /dev/null
+++ b/src/egg-obj-list.h
@@ -0,0 +1 @@
+../libpackagekit/egg-obj-list.h
\ No newline at end of file
diff --git a/src/egg-string-list.c b/src/egg-string-list.c
new file mode 100644
index 0000000..73f8cb8
--- /dev/null
+++ b/src/egg-string-list.c
@@ -0,0 +1,205 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard at hughsie.com>
+ *
+ * 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <glib.h>
+
+#include "egg-debug.h"
+#include "egg-obj-list.h"
+#include "egg-string.h"
+#include "egg-string-list.h"
+
+static void     egg_string_list_class_init	(EggStringListClass	*klass);
+static void     egg_string_list_init		(EggStringList		*string_list);
+static void     egg_string_list_finalize	(GObject		*object);
+
+#define EGG_STRING_LIST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_STRING_LIST, EggStringListPrivate))
+
+G_DEFINE_TYPE (EggStringList, egg_string_list, EGG_TYPE_OBJ_LIST)
+
+/**
+ * egg_string_list_add_strv:
+ **/
+void
+egg_string_list_add_strv (EggStringList *list, gchar **data)
+{
+	guint i;
+	guint len;
+	len = g_strv_length (data);
+	for (i=0; i<len; i++)
+		egg_obj_list_add (EGG_OBJ_LIST(list), data[i]);
+}
+
+/**
+ * egg_string_list_index:
+ **/
+inline const gchar *
+egg_string_list_index (const EggStringList *list, guint index)
+{
+	return (const gchar *) egg_obj_list_index (EGG_OBJ_LIST(list), index);
+}
+
+/**
+ * egg_string_list_print:
+ **/
+void
+egg_string_list_print (EggStringList *list)
+{
+	guint i;
+	const gchar *data;
+
+	for (i=0; i<EGG_OBJ_LIST(list)->len; i++) {
+		data = egg_string_list_index (list, i);
+		egg_debug ("list[%i] = %s", i, data);
+	}
+}
+
+/**
+ * egg_string_list_from_string_func:
+ **/
+static gpointer
+egg_string_list_from_string_func (const gchar *data)
+{
+	return (gpointer) g_strdup (data);
+}
+
+/**
+ * egg_string_list_to_string_func:
+ **/
+static gchar *
+egg_string_list_to_string_func (gconstpointer data)
+{
+	return g_strdup (data);
+}
+
+/**
+ * egg_string_list_class_init:
+ * @klass: The EggStringListClass
+ **/
+static void
+egg_string_list_class_init (EggStringListClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	object_class->finalize = egg_string_list_finalize;
+}
+
+/**
+ * egg_string_list_init:
+ * @list: This class instance
+ **/
+static void
+egg_string_list_init (EggStringList *list)
+{
+	egg_obj_list_set_compare (EGG_OBJ_LIST(list), (EggObjListCompareFunc) g_strcmp0);
+	egg_obj_list_set_copy (EGG_OBJ_LIST(list), (EggObjListCopyFunc) g_strdup);
+	egg_obj_list_set_free (EGG_OBJ_LIST(list), (EggObjListFreeFunc) g_free);
+	egg_obj_list_set_to_string (EGG_OBJ_LIST(list), (EggObjListToStringFunc) egg_string_list_to_string_func);
+	egg_obj_list_set_from_string (EGG_OBJ_LIST(list), (EggObjListFromStringFunc) egg_string_list_from_string_func);
+}
+
+/**
+ * egg_string_list_finalize:
+ * @object: The object to finalize
+ **/
+static void
+egg_string_list_finalize (GObject *object)
+{
+	G_OBJECT_CLASS (egg_string_list_parent_class)->finalize (object);
+}
+
+/**
+ * egg_string_list_new:
+ *
+ * Return value: a new EggStringList object.
+ **/
+EggStringList *
+egg_string_list_new (void)
+{
+	EggStringList *list;
+	list = g_object_new (EGG_TYPE_STRING_LIST, NULL);
+	return EGG_STRING_LIST (list);
+}
+
+/***************************************************************************
+ ***                          MAKE CHECK TESTS                           ***
+ ***************************************************************************/
+#ifdef EGG_TEST
+#include "egg-test.h"
+
+void
+egg_string_list_test (EggTest *test)
+{
+	EggStringList *list;
+	EggStringList *list2;
+
+	if (!egg_test_start (test, "EggStringList"))
+		return;
+
+	/************************************************************/
+	egg_test_title (test, "create new list");
+	list = egg_string_list_new ();
+	egg_test_assert (test, list != NULL);
+
+	/************************************************************/
+	egg_test_title (test, "length zero");
+	egg_test_assert (test, EGG_OBJ_LIST(list)->len == 0);
+
+	/************************************************************/
+	egg_test_title (test, "add stuff to list");
+	egg_obj_list_add (EGG_OBJ_LIST(list), "dave");
+	egg_obj_list_add (EGG_OBJ_LIST(list), "mark");
+	egg_obj_list_add (EGG_OBJ_LIST(list), "foo");
+	egg_obj_list_add (EGG_OBJ_LIST(list), "foo");
+	egg_obj_list_add (EGG_OBJ_LIST(list), "bar");
+	egg_test_assert (test, EGG_OBJ_LIST(list)->len == 5);
+
+	/************************************************************/
+	egg_test_title (test, "create second list");
+	list2 = egg_string_list_new ();
+	egg_obj_list_add (EGG_OBJ_LIST(list2), "mark");
+	egg_test_assert (test, EGG_OBJ_LIST(list2)->len == 1);
+
+	/************************************************************/
+	egg_test_title (test, "append the lists");
+	egg_obj_list_add_list (EGG_OBJ_LIST(list), EGG_OBJ_LIST(list2));
+	egg_test_assert (test, EGG_OBJ_LIST(list)->len == 6);
+
+	/************************************************************/
+	egg_test_title (test, "remove duplicates");
+	egg_obj_list_remove_duplicate (EGG_OBJ_LIST(list));
+	egg_test_assert (test, EGG_OBJ_LIST(list)->len == 4);
+
+	/************************************************************/
+	egg_test_title (test, "remove one list from another");
+	egg_obj_list_add_list (EGG_OBJ_LIST(list), EGG_OBJ_LIST(list2)); //dave,mark,foo,bar,mark
+	egg_obj_list_remove_list (EGG_OBJ_LIST(list), EGG_OBJ_LIST(list2));
+	egg_test_assert (test, EGG_OBJ_LIST(list)->len == 3);
+
+	g_object_unref (list2);
+	g_object_unref (list);
+	egg_test_end (test);
+}
+#endif
+
diff --git a/src/egg-string-list.h b/src/egg-string-list.h
new file mode 100644
index 0000000..38f377b
--- /dev/null
+++ b/src/egg-string-list.h
@@ -0,0 +1,63 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard at hughsie.com>
+ *
+ * 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_STRING_LIST_H
+#define __EGG_STRING_LIST_H
+
+#include <glib-object.h>
+#include "egg-obj-list.h"
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_STRING_LIST		(egg_string_list_get_type ())
+#define EGG_STRING_LIST(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), EGG_TYPE_STRING_LIST, EggStringList))
+#define EGG_STRING_LIST_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), EGG_TYPE_STRING_LIST, EggStringListClass))
+#define EGG_IS_STRING_LIST(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), EGG_TYPE_STRING_LIST))
+#define EGG_IS_STRING_LIST_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), EGG_TYPE_STRING_LIST))
+#define EGG_STRING_LIST_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), EGG_TYPE_STRING_LIST, EggStringListClass))
+#define EGG_STRING_LIST_ERROR		(egg_string_list_error_quark ())
+#define EGG_STRING_LIST_TYPE_ERROR	(egg_string_list_error_get_type ())
+
+typedef struct EggStringListPrivate EggStringListPrivate;
+
+typedef struct
+{
+	 EggObjList		 parent;
+} EggStringList;
+
+typedef struct
+{
+	EggObjListClass		parent_class;
+} EggStringListClass;
+
+GType		 egg_string_list_get_type	  	(void) G_GNUC_CONST;
+EggStringList	*egg_string_list_new			(void);
+void		 egg_string_list_add_strv		(EggStringList	*list,
+							 gchar		**data);
+const gchar	*egg_string_list_index			(const EggStringList	*list,
+							 guint		 index);
+void		 egg_string_list_print			(EggStringList	*list);
+
+
+G_END_DECLS
+
+#endif /* __EGG_STRING_LIST_H */
+
diff --git a/src/pk-self-test.c b/src/pk-self-test.c
index 7b5cef8..5397d09 100644
--- a/src/pk-self-test.c
+++ b/src/pk-self-test.c
@@ -26,6 +26,7 @@
 
 /* prototypes */
 void egg_string_test (EggTest *test);
+void egg_string_list_test (EggTest *test);
 void pk_conf_test (EggTest *test);
 void pk_store_test (EggTest *test);
 void pk_inhibit_test (EggTest *test);
@@ -45,14 +46,14 @@ main (int argc, char **argv)
 {
 	EggTest *test;
 
-	if (! g_thread_supported ()) {
+	if (! g_thread_supported ())
 		g_thread_init (NULL);
-	}
 	g_type_init ();
 	test = egg_test_init ();
 	egg_debug_init (TRUE);
 
 	/* egg */
+	egg_string_list_test (test);
 	egg_string_test (test);
 
 	/* components */
commit d495a1af2499fc3e1d509db8a9421e915da1928e
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 10:51:42 2008 +0100

    trivial: add egg_obj_list_set_compare() so we can do egg_obj_list_remove_duplicate() and also make egg_obj_list_remove() remove all entries

diff --git a/libpackagekit/egg-obj-list.c b/libpackagekit/egg-obj-list.c
index 1defaf0..e64115b 100644
--- a/libpackagekit/egg-obj-list.c
+++ b/libpackagekit/egg-obj-list.c
@@ -36,6 +36,7 @@ struct EggObjListPrivate
 	EggObjListNewFunc	 func_new;
 	EggObjListCopyFunc	 func_copy;
 	EggObjListFreeFunc	 func_free;
+	EggObjListCompareFunc	 func_compare;
 	EggObjListToStringFunc	 func_to_string;
 	EggObjListFromStringFunc func_from_string;
 	GPtrArray		*array;
@@ -86,6 +87,20 @@ egg_obj_list_set_free (EggObjList *list, EggObjListFreeFunc func)
 }
 
 /**
+ * egg_obj_list_set_compare:
+ * @list: a valid #EggObjList instance
+ * @func: typedef'd function
+ *
+ * Adds a compare func
+ **/
+void
+egg_obj_list_set_compare (EggObjList *list, EggObjListCompareFunc func)
+{
+	g_return_if_fail (EGG_IS_OBJ_LIST (list));
+	list->priv->func_compare = func;
+}
+
+/**
  * egg_obj_list_set_to_string:
  * @list: a valid #EggObjList instance
  * @func: typedef'd function
@@ -226,12 +241,12 @@ egg_obj_list_add (EggObjList *list, gconstpointer obj)
 }
 
 /**
- * egg_package_list_add_list:
+ * egg_obj_list_add_list:
  *
  * Makes a deep copy of the list
  **/
 void
-egg_package_list_add_list (EggObjList *list, const EggObjList *data)
+egg_obj_list_add_list (EggObjList *list, const EggObjList *data)
 {
 	guint i;
 	gconstpointer obj;
@@ -247,32 +262,146 @@ egg_package_list_add_list (EggObjList *list, const EggObjList *data)
 }
 
 /**
+ * egg_obj_list_remove_list:
+ *
+ * Makes a deep copy of the list
+ **/
+void
+egg_obj_list_remove_list (EggObjList *list, const EggObjList *data)
+{
+	guint i;
+	gconstpointer obj;
+
+	g_return_if_fail (EGG_IS_OBJ_LIST (list));
+	g_return_if_fail (EGG_IS_OBJ_LIST (data));
+
+	/* remove data items from list */
+	for (i=0; i < data->len; i++) {
+		obj = egg_obj_list_index (data, i);
+		egg_obj_list_remove (list, obj);
+	}
+}
+
+/**
+ * egg_obj_list_find_obj:
+ * @list: a valid #EggObjList instance
+ * @obj: a valid #gpointer object
+ *
+ * Return value: the object
+ *
+ * Removes an item from a list
+ **/
+static gboolean
+egg_obj_list_obj_equal (EggObjList *list, gconstpointer obj1, gconstpointer obj2)
+{
+	EggObjListCompareFunc func_compare;
+
+	/* two less pointer deferences... */
+	func_compare = list->priv->func_compare;
+
+	/* trivial case */
+	if (func_compare == NULL)
+		return obj1 == obj2;
+
+	/* use helper function */
+	return func_compare (obj1, obj2) == 0;
+}
+
+/**
+ * egg_obj_list_remove_duplicate:
+ *
+ * Removes duplicate entries
+ **/
+void
+egg_obj_list_remove_duplicate (EggObjList *list)
+{
+	guint i, j;
+	gconstpointer obj1;
+	gconstpointer obj2;
+
+	for (i=0; i<list->len; i++) {
+		obj1 = egg_obj_list_index (list, i);
+		for (j=0; j<list->len; j++) {
+			if (i == j)
+				break;
+			obj2 = egg_obj_list_index (list, j);
+			if (egg_obj_list_obj_equal (list, obj1, obj2))
+				egg_obj_list_remove_index (list, i);
+		}
+	}
+}
+
+/**
+ * egg_obj_list_find_obj:
+ * @list: a valid #EggObjList instance
+ * @obj: a valid #gpointer object
+ *
+ * Return value: the object
+ *
+ * Removes an item from a list
+ **/
+static gpointer
+egg_obj_list_find_obj (EggObjList *list, gconstpointer obj)
+{
+	guint i;
+	gconstpointer obj_tmp;
+	EggObjListCompareFunc func_compare;
+
+	/* the pointers point to the same thing */
+	func_compare = list->priv->func_compare;
+	if (func_compare == NULL)
+		return (gpointer) obj;
+
+	/* remove data items from list */
+	for (i=0; i < list->len; i++) {
+		obj_tmp = egg_obj_list_index (list, i);
+		if (func_compare (obj_tmp, obj) == 0)
+			return (gpointer) obj_tmp;
+	}
+
+	/* nothing found */
+	return NULL;
+}
+
+/**
  * egg_obj_list_remove:
  * @list: a valid #EggObjList instance
  * @obj: a valid #gpointer object
  *
  * Return value: TRUE is we removed something
  *
- * Removes an item from a list
+ * Removes all the items from a list matching obj
  **/
 gboolean
 egg_obj_list_remove (EggObjList *list, gconstpointer obj)
 {
 	gboolean ret;
 	gpointer obj_new;
+	gboolean found = FALSE;
 
 	g_return_val_if_fail (EGG_IS_OBJ_LIST (list), FALSE);
 	g_return_val_if_fail (obj != NULL, FALSE);
 	g_return_val_if_fail (list->priv->func_free != NULL, FALSE);
 
-	/* the pointers point to the same thing */
-	obj_new = (gpointer) obj;
-	ret = g_ptr_array_remove (list->priv->array, obj_new);
-	if (!ret)
-		return FALSE;
-	list->priv->func_free (obj_new);
-	list->len = list->priv->array->len;
-	return TRUE;
+	do {
+		/* get the object */
+		obj_new = egg_obj_list_find_obj (list, obj);
+		if (obj_new == NULL)
+			break;
+
+		/* try to remove */
+		ret = g_ptr_array_remove (list->priv->array, obj_new);
+
+		/* no compare function, and pointer not found */
+		if (!ret)
+			break;
+
+		found = TRUE;
+		list->priv->func_free (obj_new);
+		list->len = list->priv->array->len;
+	} while (ret);
+
+	return found;
 }
 
 /**
@@ -497,6 +626,7 @@ egg_obj_list_init (EggObjList *list)
 	list->priv->func_new = NULL;
 	list->priv->func_copy = NULL;
 	list->priv->func_free = NULL;
+	list->priv->func_compare = NULL;
 	list->priv->func_to_string = NULL;
 	list->priv->func_from_string = NULL;
 	list->priv->array = g_ptr_array_new ();
diff --git a/libpackagekit/egg-obj-list.h b/libpackagekit/egg-obj-list.h
index 4716af8..5237df7 100644
--- a/libpackagekit/egg-obj-list.h
+++ b/libpackagekit/egg-obj-list.h
@@ -50,6 +50,8 @@ typedef struct
 typedef gpointer (*EggObjListNewFunc)		(void);
 typedef gpointer (*EggObjListCopyFunc)		(gconstpointer		 data);
 typedef void	 (*EggObjListFreeFunc)		(gpointer		 data);
+typedef gint	 (*EggObjListCompareFunc)	(gconstpointer		 data1,
+						 gconstpointer		 data2);
 typedef gpointer (*EggObjListFromStringFunc)	(const gchar		*data);
 typedef gchar	*(*EggObjListToStringFunc)	(gconstpointer		 data);
 
@@ -62,6 +64,8 @@ void		 egg_obj_list_set_copy		(EggObjList		*list,
 						 EggObjListCopyFunc	 func);
 void		 egg_obj_list_set_free		(EggObjList		*list,
 						 EggObjListFreeFunc	 func);
+void		 egg_obj_list_set_compare	(EggObjList		*list,
+						 EggObjListCompareFunc	 func);
 void		 egg_obj_list_set_to_string	(EggObjList		*list,
 						 EggObjListToStringFunc	 func);
 void		 egg_obj_list_set_from_string	(EggObjList		*list,
@@ -78,6 +82,9 @@ void		 egg_obj_list_add		(EggObjList		*list,
 						 gconstpointer		 data);
 void		 egg_obj_list_add_list		(EggObjList		*list,
 						 const EggObjList	*data);
+void		 egg_obj_list_remove_list	(EggObjList		*list,
+						 const EggObjList	*data);
+void		 egg_obj_list_remove_duplicate	(EggObjList		*list);
 gboolean	 egg_obj_list_remove		(EggObjList		*list,
 						 gconstpointer		 data);
 gboolean	 egg_obj_list_remove_index	(EggObjList		*list,
commit bee4eb49bf6a64022a4c1d3a4608d20cf74713ca
Merge: 743c026... 4304d9b...
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 09:34:13 2008 +0100

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

commit 743c0269c01c836f8a19121f95213237e0838e28
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 09:32:30 2008 +0100

    trivial: in docbook introspection, we use doc:tt, rather than literal

diff --git a/src/pk-interface-transaction.xml b/src/pk-interface-transaction.xml
index 0d6b43a..9c087de 100644
--- a/src/pk-interface-transaction.xml
+++ b/src/pk-interface-transaction.xml
@@ -28,7 +28,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The locale code, for example <literal>en_GB</literal>.
+              The locale code, for example <doc:tt>en_GB</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -119,14 +119,14 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Status</literal> and
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Status</doc:tt> and
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>available</literal> or <literal>installed</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>available</doc:tt> or <doc:tt>installed</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -134,7 +134,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -152,7 +152,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              Either <literal>true</literal> or <literal>false</literal>. If yes then the requirements should be
+              Either <doc:tt>true</doc:tt> or <doc:tt>false</doc:tt>. If yes then the requirements should be
               returned for all packages returned.
               This means if gnome-power-manager depends on NetworkManager
               and NetworkManager depends on HAL, then GetDepends on
@@ -170,14 +170,14 @@
         <doc:description>
           <doc:para>
             This method should return all the details about a specific
-            <literal>package_id</literal>.
+            <doc:tt>package_id</doc:tt>.
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Status</literal> and
-            <literal>Error</literal> and
-            <literal>Details</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Status</doc:tt> and
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Details</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -198,14 +198,14 @@
       <doc:doc>
         <doc:description>
           <doc:para>
-            This method should return the file list of the <literal>package_id</literal>.
+            This method should return the file list of the <doc:tt>package_id</doc:tt>.
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Status</literal> and
-            <literal>Error</literal> and
-            <literal>Files</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Status</doc:tt> and
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Files</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -272,13 +272,13 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>available</literal> or <literal>installed</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>available</doc:tt> or <doc:tt>installed</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -286,7 +286,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -349,7 +349,7 @@
             This method returns the list of repositories used in the system.
           </doc:para>
           <doc:para>
-            This method should emit <literal>RepoDetail</literal>.
+            This method should emit <doc:tt>RepoDetail</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -357,7 +357,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -371,19 +371,19 @@
         <doc:description>
           <doc:para>
             This method returns packages that depend on this package.
-            This is useful to know, as if <literal>package_id</literal> is being
+            This is useful to know, as if <doc:tt>package_id</doc:tt> is being
             removed, we can warn the user what else would be removed.
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Status</literal> and
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Status</doc:tt> and
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>available</literal> or <literal>installed</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>available</doc:tt> or <doc:tt>installed</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -391,7 +391,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -409,7 +409,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              Either <literal>true</literal> or <literal>false</literal>. If yes then the requirements should be
+              Either <doc:tt>true</doc:tt> or <doc:tt>false</doc:tt>. If yes then the requirements should be
               returned for all packages returned.
               This means if gnome-power-manager depends on NetworkManager
               and NetworkManager depends on HAL, then GetRequires on
@@ -443,7 +443,7 @@
           <doc:summary>
             <doc:para>
               The original search terms or package names that are used to start the transaction.
-              Multiple entries are split using <literal>;</literal>.
+              Multiple entries are split using <doc:tt>;</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -480,8 +480,8 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>UpdateDetail</literal> and
-            <literal>Error</literal>
+            <doc:tt>UpdateDetail</doc:tt> and
+            <doc:tt>Error</doc:tt>
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -507,20 +507,20 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>blocked</literal>,
-            <literal>low</literal>,
-            <literal>normal</literal>,
-            <literal>important</literal> or
-            <literal>security</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>blocked</doc:tt>,
+            <doc:tt>low</doc:tt>,
+            <doc:tt>normal</doc:tt>,
+            <doc:tt>important</doc:tt> or
+            <doc:tt>security</doc:tt>.
           </doc:para>
           <doc:para>
-            The status <literal>blocked</literal> signifies the package cannot be
+            The status <doc:tt>blocked</doc:tt> signifies the package cannot be
             updated, probably due to other dependencies not being met.
             This type allows the GUI tools to show to the user that an update
             exists, but cannot be installed.
@@ -528,10 +528,10 @@
             description when doing GetUpdateDetail.
           </doc:para>
           <doc:para>
-            A filter such as <literal>basename</literal> or <literal>gui</literal>
+            A filter such as <doc:tt>basename</doc:tt> or <doc:tt>gui</doc:tt>
             is also useful if you want to do filtering on the method to only show
             the main packages rather than the complete list.
-            The complete list is available but specifying <literal>none</literal>
+            The complete list is available but specifying <doc:tt>none</doc:tt>
             as the filter.
             Using no filter which may be useful in advanced tools or when using
             libpackagekit and searching for an update of a specific name.
@@ -544,7 +544,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -563,8 +563,8 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>DistroUpgrade</literal>,
-            <literal>Error</literal> and
+            <doc:tt>DistroUpgrade</doc:tt>,
+            <doc:tt>Error</doc:tt> and
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -583,17 +583,17 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Status</literal> and
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Status</doc:tt> and
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>downloading</literal>,
-            <literal>updating</literal>,
-            <literal>installing</literal> or
-            <literal>removing</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>downloading</doc:tt>,
+            <doc:tt>updating</doc:tt>,
+            <doc:tt>installing</doc:tt> or
+            <doc:tt>removing</doc:tt>.
           </doc:para>
         </doc:description>
         <doc:permission>Callers need the org.freedesktop.packagekit.localinstall-untrusted</doc:permission>
@@ -633,17 +633,17 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Status</literal> and
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Status</doc:tt> and
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>downloading</literal>,
-            <literal>updating</literal>,
-            <literal>installing</literal> or
-            <literal>removing</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>downloading</doc:tt>,
+            <doc:tt>updating</doc:tt>,
+            <doc:tt>installing</doc:tt> or
+            <doc:tt>removing</doc:tt>.
           </doc:para>
         </doc:description>
         <doc:permission>Callers need the org.freedesktop.packagekit.install</doc:permission>
@@ -674,7 +674,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A key type, e.g. <literal>gpg</literal>
+              A key type, e.g. <doc:tt>gpg</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -683,7 +683,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A key ID, e.g. <literal>BB7576AC</literal>
+              A key ID, e.g. <doc:tt>BB7576AC</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -737,9 +737,9 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
         </doc:description>
         <doc:permission>Callers need the org.freedesktop.packagekit.refresh-cache</doc:permission>
@@ -765,17 +765,17 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Status</literal> and
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Status</doc:tt> and
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>downloading</literal>,
-            <literal>updating</literal>,
-            <literal>installing</literal> or
-            <literal>removing</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>downloading</doc:tt>,
+            <doc:tt>updating</doc:tt>,
+            <doc:tt>installing</doc:tt> or
+            <doc:tt>removing</doc:tt>.
           </doc:para>
         </doc:description>
         <doc:permission>Callers need the org.freedesktop.packagekit.remove</doc:permission>
@@ -793,9 +793,9 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              Either <literal>true</literal> or <literal>false</literal>.
-              If <literal>true</literal> allow other packages to be removed with the package,
-              but <literal>false</literal> should cause the script to abort if other packages
+              Either <doc:tt>true</doc:tt> or <doc:tt>false</doc:tt>.
+              If <doc:tt>true</doc:tt> allow other packages to be removed with the package,
+              but <doc:tt>false</doc:tt> should cause the script to abort if other packages
               are dependant on the package.
             </doc:para>
           </doc:summary>
@@ -805,13 +805,13 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              Either <literal>true</literal> or <literal>false</literal>.
+              Either <doc:tt>true</doc:tt> or <doc:tt>false</doc:tt>.
               This option is only really interesting on embedded devices with a limited amount of
               flash storage.
               It suggests to the packagekit backend that dependencies installed at the same time as
               the package should also be removed if they are not required by anything else.
               For instance, if you install OpenOffice, it might download libneon as a dependency.
-              When <literal>auto_remove</literal> is set to true, and you remove OpenOffice then
+              When <doc:tt>auto_remove</doc:tt> is set to true, and you remove OpenOffice then
               libneon will also get removed automatically.
             </doc:para>
           </doc:summary>
@@ -834,7 +834,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A repository identifier, e.g. <literal>fedora-development-debuginfo</literal>
+              A repository identifier, e.g. <doc:tt>fedora-development-debuginfo</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -843,7 +843,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              <literal>true</literal> if enabled, <literal>false</literal> if disabled.
+              <doc:tt>true</doc:tt> if enabled, <doc:tt>false</doc:tt> if disabled.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -865,7 +865,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A repository identifier, e.g. <literal>fedora-development-debuginfo</literal>
+              A repository identifier, e.g. <doc:tt>fedora-development-debuginfo</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -874,7 +874,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The backend specific value, e.g. <literal>set-download-url</literal>.
+              The backend specific value, e.g. <doc:tt>set-download-url</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -883,7 +883,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The backend specific value, e.g. <literal>http://foo.bar.org/baz</literal>.
+              The backend specific value, e.g. <doc:tt>http://foo.bar.org/baz</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -901,12 +901,12 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>available</literal> or <literal>installed</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>available</doc:tt> or <doc:tt>installed</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -914,7 +914,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -923,7 +923,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              An array of package names, e.g. <literal>scribus-clipart</literal>.
+              An array of package names, e.g. <doc:tt>scribus-clipart</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -968,20 +968,20 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>available</literal> or <literal>installed</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>available</doc:tt> or <doc:tt>installed</doc:tt>.
           </doc:para>        </doc:description>
       </doc:doc>
       <arg type="s" name="filter" direction="in">
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1012,20 +1012,20 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>available</literal> or <literal>installed</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>available</doc:tt> or <doc:tt>installed</doc:tt>.
           </doc:para>        </doc:description>
       </doc:doc>
       <arg type="s" name="filter" direction="in">
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1054,13 +1054,13 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>available</literal> or <literal>installed</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>available</doc:tt> or <doc:tt>installed</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -1068,7 +1068,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1077,7 +1077,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              An enumerated group_type, or <literal>unknown</literal>
+              An enumerated group_type, or <doc:tt>unknown</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1096,36 +1096,36 @@
             Do not refresh the package cache. This should be fast.
           </doc:para>
           <doc:para>
-            Try to emit <literal>installed</literal> before
-            <literal>available</literal> packages first, as it allows the client
+            Try to emit <doc:tt>installed</doc:tt> before
+            <doc:tt>available</doc:tt> packages first, as it allows the client
             program to perform the GUI filtering and matching whilst the daemon is
             running the transaction.
           </doc:para>
           <doc:para>
-            If the backend includes <literal>installed</literal> and
-            <literal>available</literal> versions of the same package when searching
-            then the <literal>available</literal> version will have to be filtered
+            If the backend includes <doc:tt>installed</doc:tt> and
+            <doc:tt>available</doc:tt> versions of the same package when searching
+            then the <doc:tt>available</doc:tt> version will have to be filtered
             in the backend.
           </doc:para>
           <doc:para>
             The search query in the backend should not be case sensitive, and
-            should not be sensitive to <literal>_</literal> or <literal>-</literal>.
+            should not be sensitive to <doc:tt>_</doc:tt> or <doc:tt>-</doc:tt>.
           </doc:para>
           <doc:para>
             The search methods should return all results in all repositories.
             This may mean that multiple versions of package are returned.
             If this is not what is wanted by the client program, then the
-            <literal>newest</literal> filter should be used.
+            <doc:tt>newest</doc:tt> filter should be used.
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>available</literal> or <literal>installed</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>available</doc:tt> or <doc:tt>installed</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -1133,7 +1133,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1165,10 +1165,10 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Status</literal> and
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Status</doc:tt> and
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
         </doc:description>
         <doc:permission>Callers need the org.freedesktop.packagekit.update-package</doc:permission>
@@ -1200,17 +1200,17 @@
         </doc:description>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Error</literal> and
-            <literal>RequireRestart</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>RequireRestart</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>downloading</literal>,
-            <literal>updating</literal>,
-            <literal>installing</literal> or
-            <literal>removing</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>downloading</doc:tt>,
+            <doc:tt>updating</doc:tt>,
+            <doc:tt>installing</doc:tt> or
+            <doc:tt>removing</doc:tt>.
           </doc:para>
         <doc:permission>Callers need the org.freedesktop.packagekit.update-system</doc:permission>
       </doc:doc>
@@ -1228,14 +1228,14 @@
           </doc:para>
           <doc:para>
             This method typically emits
-            <literal>Progress</literal>,
-            <literal>Status</literal> and
-            <literal>Error</literal> and
-            <literal>Package</literal>.
+            <doc:tt>Progress</doc:tt>,
+            <doc:tt>Status</doc:tt> and
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
           <doc:para>
-            <literal>Package</literal> enumerated types should be
-            <literal>available</literal> or <literal>installed</literal>.
+            <doc:tt>Package</doc:tt> enumerated types should be
+            <doc:tt>available</doc:tt> or <doc:tt>installed</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -1243,7 +1243,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A correct filter, e.g. <literal>none</literal> or <literal>installed;~devel</literal>
+              A correct filter, e.g. <doc:tt>none</doc:tt> or <doc:tt>installed;~devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1252,7 +1252,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A PkProvideType, e.g. <literal>PK_PROVIDES_ENUM_CODEC</literal>.
+              A PkProvideType, e.g. <doc:tt>PK_PROVIDES_ENUM_CODEC</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1332,7 +1332,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The license string, e.g. <literal>GPLv2+</literal> or <literal>BSD and (MPLv1.1 or GPLv2+)</literal>.
+              The license string, e.g. <doc:tt>GPLv2+</doc:tt> or <doc:tt>BSD and (MPLv1.1 or GPLv2+)</doc:tt>.
             </doc:para>
             <doc:para>
               More details about the correct way to format licensing strings can be found on the
@@ -1397,7 +1397,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              Enumerated type, e.g. <literal>no-network</literal>.
+              Enumerated type, e.g. <doc:tt>no-network</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1406,7 +1406,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              Long description or error, e.g. <literal>failed to connect to mytry.xml</literal>
+              Long description or error, e.g. <doc:tt>failed to connect to mytry.xml</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1435,7 +1435,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The file list, with each file seporated with <literal>;</literal>.
+              The file list, with each file seporated with <doc:tt>;</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1488,8 +1488,8 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              One of <literal>warning</literal>, <literal>notice</literal>, or
-              <literal>daemon</literal>.
+              One of <doc:tt>warning</doc:tt>, <doc:tt>notice</doc:tt>, or
+              <doc:tt>daemon</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1518,7 +1518,7 @@
           </doc:para>
           <doc:para>
             When returning results from a search always return
-            <literal>installed</literal> before <literal>available</literal> for
+            <doc:tt>installed</doc:tt> before <doc:tt>available</doc:tt> for
             the same package name.
           </doc:para>
         </doc:description>
@@ -1527,7 +1527,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A valid <literal>info</literal> string enumerated type
+              A valid <doc:tt>info</doc:tt> string enumerated type
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1734,7 +1734,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The type of signature used. <literal>gpg</literal>, for example.
+              The type of signature used. <doc:tt>gpg</doc:tt>, for example.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1758,10 +1758,10 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The <literal>eula_id</literal> which identifies the EULA - this is provided
+              The <doc:tt>eula_id</doc:tt> which identifies the EULA - this is provided
               so that if a specific EULA has previously agreed to a EULA from Acme Corp it is
               not asked again.
-              An example <literal>eula_id</literal>'s is <literal>vmware5_single_user</literal>.
+              An example <doc:tt>eula_id</doc:tt>'s is <doc:tt>vmware5_single_user</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1816,8 +1816,8 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              One of <literal>system</literal>, <literal>application</literal> or
-              <literal>session</literal>.
+              One of <doc:tt>system</doc:tt>, <doc:tt>application</doc:tt> or
+              <doc:tt>session</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1844,7 +1844,7 @@
             This is optional, but highly recommended.
             It gives the GUI tools a chance to show a different icon to show what stage the
             transaction is in, for instance, a downloading icon can be shown whilst in the
-            <literal>download</literal> state.
+            <doc:tt>download</doc:tt> state.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -1852,8 +1852,8 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              One of <literal>download</literal>, <literal>install</literal>,
-              <literal>update</literal> or <literal>remove</literal>.
+              One of <doc:tt>download</doc:tt>, <doc:tt>install</doc:tt>,
+              <doc:tt>update</doc:tt> or <doc:tt>remove</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1947,9 +1947,9 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A list of package_id's that are to be updated, seporated by <literal>&amp;</literal>.
-              This odd delimited was chosen as <literal>\t</literal> is already being used in the
-              spawned backends, and <literal>&amp;</literal> is a banned character in a package_id.
+              A list of package_id's that are to be updated, seporated by <doc:tt>&amp;</doc:tt>.
+              This odd delimited was chosen as <doc:tt>\t</doc:tt> is already being used in the
+              spawned backends, and <doc:tt>&amp;</doc:tt> is a banned character in a package_id.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1958,7 +1958,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A list of package_id's that are to be obsoleted, separated by <literal>&amp;</literal>
+              A list of package_id's that are to be obsoleted, separated by <doc:tt>&amp;</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1970,7 +1970,7 @@
               A URL with more details on the update, e.g. a page with more
               information on the update.
               The format of this command should be
-              <literal>http://www.foo.org/page.html?4567;Update to SELinux</literal>
+              <doc:tt>http://www.foo.org/page.html?4567;Update to SELinux</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -1998,7 +1998,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A valid restart type, e.g. <literal>system</literal>.
+              A valid restart type, e.g. <doc:tt>system</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -2008,7 +2008,7 @@
           <doc:summary>
             <doc:para>
               The update text describing the update in a non-localised way.
-              Newlines should be converted to <literal>;</literal> before printed.
+              Newlines should be converted to <doc:tt>;</doc:tt> before printed.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -2026,8 +2026,8 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The state of the update, e.g. <literal>stable</literal> or
-              <literal>testing</literal>.
+              The state of the update, e.g. <doc:tt>stable</doc:tt> or
+              <doc:tt>testing</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -2066,8 +2066,8 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A valid upgrade string enumerated type, e.g. <literal>stable</literal>
-              or <literal>unstable</literal>
+              A valid upgrade string enumerated type, e.g. <doc:tt>stable</doc:tt>
+              or <doc:tt>unstable</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -2076,7 +2076,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The short name of the distribution, e.g. <literal>Fedora Core 10 RC1</literal>
+              The short name of the distribution, e.g. <doc:tt>Fedora Core 10 RC1</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
diff --git a/src/pk-interface.xml b/src/pk-interface.xml
index ae89d58..6de59b2 100644
--- a/src/pk-interface.xml
+++ b/src/pk-interface.xml
@@ -26,7 +26,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              A list of actions, e.g. <literal>search-name;get-updates;update-system</literal>
+              A list of actions, e.g. <doc:tt>search-name;get-updates;update-system</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -55,7 +55,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The author of the backend, e.g. <literal>Richard Hughes &lt;richard at hughsie.com&gt;</literal>
+              The author of the backend, e.g. <doc:tt>Richard Hughes &lt;richard at hughsie.com&gt;</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -75,7 +75,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The list of filters as a string, e.g. <literal>installed;devel</literal>
+              The list of filters as a string, e.g. <doc:tt>installed;devel</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -95,7 +95,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The group list, e.g. <literal>accesories;games;system</literal>
+              The group list, e.g. <doc:tt>accesories;games;system</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -115,7 +115,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The tid, e.g. <literal>45_dafeca_checkpoint32</literal>
+              The tid, e.g. <doc:tt>45_dafeca_checkpoint32</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -135,7 +135,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The role, e.g. <literal>update-system</literal>
+              The role, e.g. <doc:tt>update-system</doc:tt>
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -186,8 +186,8 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The reason of the state change. Valid reasons are <literal>resume</literal> or
-              <literal>posttrans</literal>.
+              The reason of the state change. Valid reasons are <doc:tt>resume</doc:tt> or
+              <doc:tt>posttrans</doc:tt>.
               Resume is given a lower priority than posttrans.
             </doc:para>
           </doc:summary>
@@ -221,8 +221,8 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The network state, e.g. <literal>unknown</literal>,
-              <literal>offline</literal> or <literal>online</literal>.
+              The network state, e.g. <doc:tt>unknown</doc:tt>,
+              <doc:tt>offline</doc:tt> or <doc:tt>online</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -244,7 +244,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The HTTP proxy, e.g. <literal>username:password at server:port</literal>.
+              The HTTP proxy, e.g. <doc:tt>username:password at server:port</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
@@ -253,7 +253,7 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The FTP proxy, e.g. <literal>username:password at server:port</literal>.
+              The FTP proxy, e.g. <doc:tt>username:password at server:port</doc:tt>.
             </doc:para>
           </doc:summary>
         </doc:doc>
commit 32545f4f48d38f52151e4536e9f99c79151a89fc
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 29 09:31:42 2008 +0100

    trivial: add a not about the licence field in the ::Details signal

diff --git a/src/pk-interface-transaction.xml b/src/pk-interface-transaction.xml
index 8cc7aea..0d6b43a 100644
--- a/src/pk-interface-transaction.xml
+++ b/src/pk-interface-transaction.xml
@@ -1332,7 +1332,11 @@
         <doc:doc>
           <doc:summary>
             <doc:para>
-              The license, e.g. <literal>GPLv2+</literal> or <literal>proprietary</literal>.
+              The license string, e.g. <literal>GPLv2+</literal> or <literal>BSD and (MPLv1.1 or GPLv2+)</literal>.
+            </doc:para>
+            <doc:para>
+              More details about the correct way to format licensing strings can be found on the
+              <doc:ulink url="http://fedoraproject.org/wiki/Packaging/LicensingGuidelines">Fedora packaging wiki</doc:ulink>.
             </doc:para>
           </doc:summary>
         </doc:doc>
commit 4304d9b35f5bf25aa1b7425c168ff9c43443bdb7
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Mon Sep 29 10:29:36 2008 +0200

    Add me to the authors page

diff --git a/docs/html/pk-authors.html b/docs/html/pk-authors.html
index cd4a134..1c2e79d 100644
--- a/docs/html/pk-authors.html
+++ b/docs/html/pk-authors.html
@@ -278,6 +278,26 @@
  </td>
 </tr>
 
+<tr>
+ <td>
+  <img src="img/author-glatzor.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>Sebastian Heinlein</h2>
+  <p>
+   Sebastian is a geratic nurse and Free software volunteer from Germany.
+   He rewrote the apt backend to turn it into a dbus daemon. The main focus
+   of his development work is package management including the corresponding 
+   user interfaces, see <a href="http://www.glatzor.de/projects/">here</a>
+   for a list of further contributions.
+  </p>
+  <p>
+   <b>Responsible for: apt backend</b>
+  </p>
+ </td>
+</tr>
+
+
 </table>
 
 <p>Back to the <a href="index.html">main page</a></p>
commit 3b2620adceef4c54aedbcc0152bed2f7b170ae85
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Mon Sep 29 10:19:40 2008 +0200

    Update download information for Ubuntu.

diff --git a/docs/html/pk-download.html b/docs/html/pk-download.html
index 75f037d..7f985ca 100644
--- a/docs/html/pk-download.html
+++ b/docs/html/pk-download.html
@@ -33,7 +33,7 @@ easier to install.
   </li>
   <li>
   Ubuntu: Ubuntu 8.04 Hardy Heron ships an obsolete version (0.1.6) of PackageKit by default.
-  Intrepid, the upcoming Ubuntu release, features 0.2.4, but we plan to ship 0.3.2.<br/>
+  Intrepid, the upcoming Ubuntu release, features a recent version from the 0.3 series.<br/>
   You can find the latest version of the 0.3 series for Hardy and Intrepid in this
   <a href="https://edge.launchpad.net/~packagekit/+archive">Personal Package Archive</a>.
   <a href="https://help.ubuntu.com/8.04/add-applications/C/extra-repositories-adding.html">Add</a>
commit 98b55f2b65e684f54396b6f893569844f0d2ca76
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Mon Sep 29 10:14:48 2008 +0200

    APT: Use force-confdef and force-confold also in recovery call of dpkg

diff --git a/backends/apt/aptDBUSBackend.py b/backends/apt/aptDBUSBackend.py
index 122d45c..d8b953e 100755
--- a/backends/apt/aptDBUSBackend.py
+++ b/backends/apt/aptDBUSBackend.py
@@ -255,7 +255,7 @@ class DpkgInstallProgress(apt.progress.InstallProgress):
         Run "dpkg --configure -a"
         """
         cmd = ["/usr/bin/dpkg", "--status-fd", str(self.writefd), 
-               "--configure", "-a"]
+               "--force-confdef", "--force-confold", "--configure", "-a"]
         self.run(cmd)
 
     def install(self, filenames):
commit ed0251d5f3577af3d48d3883de20bb078d2580e2
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Mon Sep 29 02:53:07 2008 +0200

    APT: Fix path of apt config file

diff --git a/data/Makefile.am b/data/Makefile.am
index 4668de1..14ac591 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -23,7 +23,7 @@ upgradescriptdir = $(datadir)/PackageKit
 upgradescript_SCRIPTS = pk-upgrade-distro.sh
 
 if BACKEND_TYPE_APT
-aptconfdir = ${SYSCONFDIR}/apt.conf.d
+aptconfdir = ${SYSCONFDIR}/apt/apt.conf.d
 aptconf_DATA = 20packagekit
 endif
 
commit 5527f61af7b87f9c001b73661c21a73f68e85235
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Mon Sep 29 02:51:54 2008 +0200

    APT: Instead of catching and answering a config file prompt just set the dpkg options --force-confdef and --force-confold

diff --git a/backends/apt/aptDBUSBackend.py b/backends/apt/aptDBUSBackend.py
index e09b12b..122d45c 100755
--- a/backends/apt/aptDBUSBackend.py
+++ b/backends/apt/aptDBUSBackend.py
@@ -57,6 +57,8 @@ warnings.filterwarnings(action='ignore', category=FutureWarning)
 PACKAGEKIT_DBUS_SERVICE = 'org.freedesktop.PackageKitAptBackend'
 
 apt_pkg.InitConfig()
+apt_pkg.Config.Set("DPkg::Options::", '--force-confdef')
+apt_pkg.Config.Set("DPkg::Options::", '--force-confold')
 
 # Xapian database is optionally used to speed up package description search
 XAPIAN_DB_PATH = os.environ.get("AXI_DB_PATH", "/var/lib/apt-xapian-index")
@@ -260,7 +262,8 @@ class DpkgInstallProgress(apt.progress.InstallProgress):
         """
         Install the given package using a dpkg command line call
         """
-        cmd = ["/usr/bin/dpkg", "--status-fd", str(self.writefd), "-i"]
+        cmd = ["/usr/bin/dpkg", "--force-confdef", "--force-confold",
+               "--status-fd", str(self.writefd), "-i"]
         cmd.extend(map(lambda f: str(f), filenames))
         self.run(cmd)
 
@@ -445,9 +448,6 @@ class PackageKitInstallProgress(apt.progress.InstallProgress):
 
     def conffile(self, current, new):
         pklog.warning("Config file prompt: '%s' (sending no)" % current)
-        time.sleep(1)
-        i = os.write(self.master_fd, "n\n")
-        pklog.debug("wrote n, send %i bytes" % i)
         self.conffile_prompts.add(new)
 
     def error(self, pkg, msg):
commit 91042265fc572c16cff888fedcc64ab51e4529f0
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Mon Sep 29 02:17:01 2008 +0200

    APT: Fix config file prompts in direct dpkg calls and add a small sleep
    before sending the answer to give dpkg a chance to show the dialog

diff --git a/backends/apt/aptDBUSBackend.py b/backends/apt/aptDBUSBackend.py
index ac35e9a..e09b12b 100755
--- a/backends/apt/aptDBUSBackend.py
+++ b/backends/apt/aptDBUSBackend.py
@@ -302,10 +302,9 @@ class DpkgInstallProgress(apt.progress.InstallProgress):
             elif status == "conffile-prompt":
                 # we get a string like this:
                 # 'current-conffile' 'new-conffile' useredited distedited
-                #FIXME Not tested
-                match = re.compile("\s*\'(.*)\'\s*\'(.*)\'.*").match(status)
-                if match:
-                    self.conffile(match.group(1), match.group(2))
+                match = re.search(".+conffile-prompt : '(.+)' '(.+)'",
+                                  self.read)
+                self.conffile(match.group(1), match.group(2))
             else:
                 pklog.debug("Dpkg status: %s" % status)
                 self.status = status
@@ -446,6 +445,7 @@ class PackageKitInstallProgress(apt.progress.InstallProgress):
 
     def conffile(self, current, new):
         pklog.warning("Config file prompt: '%s' (sending no)" % current)
+        time.sleep(1)
         i = os.write(self.master_fd, "n\n")
         pklog.debug("wrote n, send %i bytes" % i)
         self.conffile_prompts.add(new)
commit ac8ca2c7b3f55ed9cb4f772dbe6fcbee043003a0
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Mon Sep 29 01:51:18 2008 +0200

    APT: scan for debian bugs and cves referred to in the changelog

diff --git a/backends/apt/aptDBUSBackend.py b/backends/apt/aptDBUSBackend.py
index b598d1d..ac35e9a 100755
--- a/backends/apt/aptDBUSBackend.py
+++ b/backends/apt/aptDBUSBackend.py
@@ -144,6 +144,17 @@ SECTION_GROUP_MAP = {
     "translations" : GROUP_LOCALIZATION,
     "metapackages" : GROUP_COLLECTIONS }
 
+# Regular expressions to detect bug numbers in changelogs according to the
+# Debian Policy Chapter 4.4. For details see the footnote 16:
+# http://www.debian.org/doc/debian-policy/footnotes.html#f16
+MATCH_BUG_CLOSES_DEBIAN=r"closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*"
+MATCH_BUG_NUMBERS=r"\#?\s?(\d+)"
+# URL pointing to a bug in the Debian bug tracker
+HREF_BUG_DEBIAN="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%s"
+
+# Regular expression to find cve references
+MATCH_CVE="CVE-\d{4}-\d{4}"
+HREF_CVE="http://web.nvd.nist.gov/view/vuln/detail?vulnId=%s"
 
 def unlock_cache_afterwards(func):
     '''
@@ -735,6 +746,25 @@ class PackageKitAptBackend(PackageKitBaseBackend):
         '''
         Implement the {backend}-get-update-details functionality
         '''
+        def get_bug_urls(changelog):
+            """
+            Create a list of urls pointing to closed bugs in the changelog
+            """
+            urls = []
+            #FIXME: Add support for Launchpad/Ubuntu
+            for r in re.findall(MATCH_BUG_CLOSES_DEBIAN, changelog,
+                                re.IGNORECASE | re.MULTILINE):
+                urls.extend(map(lambda b: HREF_BUG_DEBIAN % b,
+                                re.findall(MATCH_BUG_NUMBERS, r)))
+            return urls
+
+        def get_cve_urls(changelog):
+            """
+            Create a list of urls pointing to cves referred in the changelog
+            """
+            return map(lambda c: HREF_CVE % c,
+                       re.findall(MATCH_CVE, changelog, re.MULTILINE))
+
         pklog.info("Get update details of %s" % pkg_ids)
         self.StatusChanged(STATUS_INFO)
         self.NoPercentageUpdates()
@@ -752,20 +782,20 @@ class PackageKitAptBackend(PackageKitBaseBackend):
             updates = self.get_id_from_package(pkg, force_candidate=False)
             obsoletes = ""
             vendor_url = ""
-            bugzilla_url = ""
-            cvs_url = ""
             restart = ""
             update_text = ""
+            state = ""
+            issued = ""
+            updated = ""
             #FIXME: Replace this method with the python-apt one as soon as the
             #       consolidate branch gets merged
             self.StatusChanged(STATUS_DOWNLOAD_CHANGELOG)
             changelog = self._get_changelog(pkg)
             self.StatusChanged(STATUS_INFO)
-            state = ""
-            issued = ""
-            updated = ""
+            bugzilla_url = ";".join(get_bug_urls(changelog))
+            cve_url = ";".join(get_cve_urls(changelog))
             self.UpdateDetail(pkg_id, updates, obsoletes, vendor_url,
-                              bugzilla_url, cvs_url, restart, update_text,
+                              bugzilla_url, cve_url, restart, update_text,
                               changelog, state, issued, updated)
         self.Finished(EXIT_SUCCESS)
 
commit 8f71f6e72727434100a563fa299c54684fd38278
Merge: 29c4b00... 91eb1d2...
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Sun Sep 28 23:04:55 2008 +0200

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

commit 29c4b0014b0be6d1eed4641074906e80c55da22a
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Sun Sep 28 23:04:03 2008 +0200

    APT: Fix some errors and warnings reported by pylint

diff --git a/backends/apt/aptDBUSBackend.py b/backends/apt/aptDBUSBackend.py
index 7443299..b598d1d 100755
--- a/backends/apt/aptDBUSBackend.py
+++ b/backends/apt/aptDBUSBackend.py
@@ -150,9 +150,9 @@ def unlock_cache_afterwards(func):
     Make sure that the package cache is unlocked after the decorated function
     was called
     '''
-    def wrapper(*args,**kwargs):
+    def wrapper(*args, **kwargs):
         backend = args[0]
-        func(*args,**kwargs)
+        func(*args, **kwargs)
         backend._unlock_cache()
     wrapper.__name__ = func.__name__
     return wrapper
@@ -277,11 +277,11 @@ class DpkgInstallProgress(apt.progress.InstallProgress):
         except OSError, (error_no, error_str):
             # resource temporarly unavailable is ignored
             if error_no not in [errno.EAGAIN, errno.EWOULDBLOCK]:
-                print err_str
+                print error_str
         if self.read.endswith("\n"):
             statusl = string.split(self.read, ":")
             if len(statusl) < 3:
-                pklog.warn("got garbage from dpkg: '%s'" % read)
+                pklog.warn("got garbage from dpkg: '%s'" % self.read)
                 self.read = ""
             status = statusl[2].strip()
             pkg = statusl[1].strip()
@@ -291,7 +291,8 @@ class DpkgInstallProgress(apt.progress.InstallProgress):
             elif status == "conffile-prompt":
                 # we get a string like this:
                 # 'current-conffile' 'new-conffile' useredited distedited
-                match = re.compile("\s*\'(.*)\'\s*\'(.*)\'.*").match(status_str)
+                #FIXME Not tested
+                match = re.compile("\s*\'(.*)\'\s*\'(.*)\'.*").match(status)
                 if match:
                     self.conffile(match.group(1), match.group(2))
             else:
@@ -389,6 +390,8 @@ class PackageKitInstallProgress(apt.progress.InstallProgress):
         self.timeout = 10 * 60
         self.start_time = None
         self.output = ""
+        self.master_fd = None
+        self.child_pid = None
 
     def statusChange(self, pkg, percent, status):
         self.last_activity = time.time()
@@ -654,8 +657,8 @@ class PackageKitAptBackend(PackageKitBaseBackend):
         #FIXME: Add support for description
         if meta_release.new_dist != None:
             self.DistroUpgrade("stable", 
-                               "%s %s" % (meta_release.new_dist.name, 
-                                          meta_release_new_dist.version), 
+                               "%s %s" % (meta_release.new_dist.name,
+                                          meta_release.new_dist.version),
                                "The latest stable release")
         self.Finished(EXIT_SUCCESS)
 
@@ -742,7 +745,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
             pkg = self._find_package_by_id(pkg_id)
             if pkg == None:
                 self.ErrorCode(ERROR_PACKAGE_NOT_FOUND,
-                               "Package %s isn't available" % name)
+                               "Package %s isn't available" % id)
                 self.Finished(EXIT_FAILED)
                 return
             # FIXME add some real data
@@ -782,7 +785,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
             pkg = self._find_package_by_id(pkg_id)
             if pkg == None:
                 self.ErrorCode(ERROR_PACKAGE_NOT_FOUND,
-                               "Package %s isn't available" % name)
+                               "Package %s isn't available" % id)
                 self.Finished(EXIT_FAILED)
                 return
             desc = self._get_package_description(pkg)
@@ -979,7 +982,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
                 self.ErrorCode(ERROR_UNKNOWN,
                                "Please make sure that python-software-properties is"
                                "correctly installed.")
-            self.Finished(EXIT_FALIED)
+            self.Finished(EXIT_FAILED)
             return
         repos = PackageKitSoftwareProperties()
 
@@ -1103,7 +1106,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
         self.PercentageChanged(0)
         # Check the destination directory
         if not os.path.isdir(dest) or not os.access(dest, os.W_OK):
-            self.ErrorCode(ERROR_UNKOWN,
+            self.ErrorCode(ERROR_UNKNOWN,
                            "The directory '%s' is not writable" % dest)
             self.Finished(EXIT_FAILED)
             return
@@ -1149,7 +1152,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
                 shutil.copy(item.DestFile, dest)
             except Exception, e:
                 self.ErrorCode(ERROR_INTERNAL_ERROR,
-                               "Failed to copy %s to %s: %s" % (pkg_path,
+                               "Failed to copy %s to %s: %s" % (item.DestFile,
                                                                 dest, e))
                 self.Finished(EXIT_FAILED)
                 return
@@ -1382,7 +1385,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
             pkg = self._find_package_by_id(id)
             if pkg == None:
                 self.ErrorCode(ERROR_PACKAGE_NOT_FOUND,
-                               "Package %s isn't available" % name)
+                               "Package %s isn't available" % id)
                 self.Finished(EXIT_FAILED)
                 return
             try:
@@ -1441,7 +1444,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
             pkg = self._find_package_by_id(id)
             if pkg == None:
                 self.ErrorCode(ERROR_PACKAGE_NOT_FOUND,
-                               "Package %s isn't available" % name)
+                               "Package %s isn't available" % id)
                 self.Finished(EXIT_FAILED)
                 return
             if pkg._pkg.Essential == True:
@@ -1595,10 +1598,10 @@ class PackageKitAptBackend(PackageKitBaseBackend):
         Set a proxy server for http and ftp transfer
         '''
         if http_proxy:
-            pkglog.debug("Set http proxy to %s" % http_proxy)
+            pklog.debug("Set http proxy to %s" % http_proxy)
             apt_pkg.Config.set("http::Proxy", http_proxy)
         if ftp_proxy:
-            pkglog.debug("Set ftp proxy to %s" % ftp_proxy)
+            pklog.debug("Set ftp proxy to %s" % ftp_proxy)
             apt_pkg.Config.set("ftp::Proxy", ftp_proxy)
 
     def doSetLocale(self, code):
@@ -2110,8 +2113,8 @@ class PackageKitAptBackend(PackageKitBaseBackend):
                     line = raw_line
             else:
                 line = raw_line
-                pkglog.debug("invalid line %s in description for %s:\n%s" % \
-                             (i, pkg.name, pkg.rawDescription))
+                pklog.debug("invalid line %s in description for %s:\n%s" % \
+                            (i, pkg.name, pkg.rawDescription))
             # Use dots for lists
             line = re.sub(r"^(\s*)(\*|0|o|-) ", ur"\1\u2022 ", line, 1)
             # Add current line to the description
commit 1fc255843b4c5c7270dbf2544d69c283df0b6a9d
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Sun Sep 28 22:44:40 2008 +0200

    APT: Fix whitespaces reported by pylint

diff --git a/backends/apt/aptDBUSBackend.py b/backends/apt/aptDBUSBackend.py
index 07b67ba..7443299 100755
--- a/backends/apt/aptDBUSBackend.py
+++ b/backends/apt/aptDBUSBackend.py
@@ -229,8 +229,8 @@ class PackageKitCache(apt.cache.Cache):
         return providers
 
     def clear(self):
-         """ Unmark all changes """
-         self._depcache.Init()
+        """ Unmark all changes """
+        self._depcache.Init()
 
 
 class DpkgInstallProgress(apt.progress.InstallProgress):
@@ -293,7 +293,7 @@ class DpkgInstallProgress(apt.progress.InstallProgress):
                 # 'current-conffile' 'new-conffile' useredited distedited
                 match = re.compile("\s*\'(.*)\'\s*\'(.*)\'.*").match(status_str)
                 if match:
-                     self.conffile(match.group(1), match.group(2))
+                    self.conffile(match.group(1), match.group(2))
             else:
                 pklog.debug("Dpkg status: %s" % status)
                 self.status = status
@@ -650,7 +650,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
         meta_release = MetaReleaseCore(False, False)
         #FIXME: should use a lock
         while meta_release.downloading:
-                time.sleep(1)
+            time.sleep(1)
         #FIXME: Add support for description
         if meta_release.new_dist != None:
             self.DistroUpgrade("stable", 
@@ -678,14 +678,14 @@ class PackageKitAptBackend(PackageKitBaseBackend):
                 # Skip versions which are not later
                 if inst_ver and \
                    apt_pkg.VersionCompare(ver.VerStr, inst_ver.VerStr) <= 0:
-                       continue
+                    continue
                 for(verFileIter, index) in ver.FileList:
                     if verFileIter.Origin in ["Debian", "Ubuntu"] and \
                        (verFileIter.Archive.endswith("-security") or \
                         verFileIter.Label == "Debian-Security"):
-                            indexfile = pkg._list.FindIndex(verFileIter)
-                            if indexfile and indexfile.IsTrusted:
-                                return True
+                        indexfile = pkg._list.FindIndex(verFileIter)
+                        if indexfile and indexfile.IsTrusted:
+                            return True
             return False
         #FIXME: Implment the basename filter
         pklog.info("Get updates")
@@ -718,11 +718,11 @@ class PackageKitAptBackend(PackageKitBaseBackend):
                     elif archive.endswith("-updates"):
                         info = INFO_BUGFIX
                 if origin in ["Backports.org archive"] and trusted == True:
-                        info = INFO_ENHANCEMENT
+                    info = INFO_ENHANCEMENT
                 self._emit_package(pkg, info, force_candidate=True)
         # Report packages that are upgradable but cannot be upgraded
         for missed in updates:
-             self._emit_package(self._cache[missed], INFO_BLOCKED)
+            self._emit_package(self._cache[missed], INFO_BLOCKED)
         self._cache.clear()
         self.Finished(EXIT_SUCCESS)
 
@@ -1742,9 +1742,9 @@ class PackageKitAptBackend(PackageKitBaseBackend):
         corresponding error message and return True
         '''
         if self._canceled.isSet():
-             self.Finished(EXIT_CANCELLED)
-             self._canceled.clear()
-             return True
+            self.Finished(EXIT_CANCELLED)
+            self._canceled.clear()
+            return True
         return False
  
     def get_id_from_package(self, pkg, force_candidate=False):
@@ -2051,8 +2051,8 @@ class PackageKitAptBackend(PackageKitBaseBackend):
                     "until the changes become available or try again " \
                     "later." % (src_pkg, src_ver)
         except IOError, httplib.BadStatusLine:
-                return "Failed to download the list of changes.\nPlease " \
-                        "check your Internet connection."
+            return "Failed to download the list of changes.\nPlease " \
+                   "check your Internet connection."
         return changelog
 
     def _get_package_group(self, pkg):
@@ -2134,10 +2134,10 @@ def debug_exception(type, value, tb):
         # redirected or on syntax errors
         sys.__excepthook__(type, value, tb)
     else:
-       import traceback, pdb
-       traceback.print_exception(type, value, tb)
-       print
-       pdb.pm()
+        import traceback, pdb
+        traceback.print_exception(type, value, tb)
+        print
+        pdb.pm()
 
 def takeover():
     """
commit 91eb1d2369ef6d6b52805e09f45b4c95d5378ad2
Author: Xavier Conde <xavi.conde at gmail.com>
Date:   Sun Sep 28 19:12:29 2008 +0000

    Updated catalan po
    
    Transmitted-via: Transifex (translate.fedoraproject.org)

diff --git a/po/ca.po b/po/ca.po
index c3b1d8e..1089b43 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -20,8 +20,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: packagekit\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-06-11 09:38+0000\n"
-"PO-Revision-Date: 2008-06-14 12:27+0100\n"
+"POT-Creation-Date: 2008-09-25 00:31+0000\n"
+"PO-Revision-Date: 2008-09-28 12:27+0100\n"
 "Last-Translator: Pere Argelich <bakidok at gmail.com>\n"
 "Language-Team: Catalan <fedora at softcatala.net>\n"
 "MIME-Version: 1.0\n"
@@ -29,297 +29,468 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
-#: ../client/pk-console.c:223
+#: ../client/pk-console.c:274
 msgid "Update detail"
 msgstr "Detalls de l'actualització"
 
-#: ../client/pk-console.c:424
+#: ../client/pk-console.c:491
 msgid "A system restart is required"
 msgstr "Es requereix reiniciar el sistema"
 
-#: ../client/pk-console.c:426
+#: ../client/pk-console.c:493
 msgid "A logout and login is required"
 msgstr "Es requereix sortir de la sessió"
 
-#: ../client/pk-console.c:428
+#: ../client/pk-console.c:495
 msgid "An application restart is required"
 msgstr "Es requereix reiniciar l'aplicació"
 
-#: ../client/pk-console.c:473
-#, c-format
-msgid "Please enter a number from 1 to %i: "
-msgstr "Si us plau, introduïu un valor d'1 a %i:"
-
-#: ../client/pk-console.c:533
-msgid "Could not find a package match"
-msgstr "No s'han trobat coincidències en cap paquet"
-
-#: ../client/pk-console.c:547
+#: ../client/pk-console.c:588 ../client/pk-generate-pack.c:126
 msgid "There are multiple package matches"
 msgstr "Existeixen coincidències amb múltiples paquets"
 
 #. find out what package the user wants to use
-#: ../client/pk-console.c:554
+#: ../client/pk-console.c:595 ../client/pk-generate-pack.c:133
 msgid "Please enter the package number: "
 msgstr "Si us plau, introduïu el número de paquet:"
 
-#: ../client/pk-console.c:589
-msgid "Could not find a package with that name to install, or package already installed"
-msgstr "No s'ha pogut trobar un paquet amb aquest nom per instal·lar, o el paquet ja es troba instal·lat"
+#: ../client/pk-console.c:629
+msgid "Could not find package to install"
+msgstr "No s'ha trobat cap paquet per a instal·lar"
 
-#: ../client/pk-console.c:737
-msgid "Could not find a package to remove"
+#: ../client/pk-console.c:735
+msgid "Could not find package to remove"
 msgstr "No s'ha trobat cap paquet per a eliminar"
 
-#: ../client/pk-console.c:806
+#: ../client/pk-console.c:796
 msgid "The following packages have to be removed"
 msgstr "Els següents paquets seran eliminats"
 
 #. get user input
-#: ../client/pk-console.c:815
+#: ../client/pk-console.c:803
 msgid "Okay to remove additional packages?"
 msgstr "Esteu d'acord en eliminar els paquets adicionals?"
 
-#: ../client/pk-console.c:819
+#: ../client/pk-console.c:807 ../client/pk-generate-pack.c:528
+#: ../client/pk-generate-pack-main.c:131
 msgid "Cancelled!"
 msgstr "Cancel·lat"
 
-#: ../client/pk-console.c:844
-msgid "Could not find a package with that name to update"
-msgstr "No s'ha pogut trobar un paquet amb aquest nom per actualitzar"
+#: ../client/pk-console.c:841
+msgid "Could not find package to download"
+msgstr "No s'ha trobat cap paquet per a baixar"
+
+#: ../client/pk-console.c:893
+msgid "Could not find package to update"
+msgstr "No s'ha trobat cap paquet per a actualitzar"
 
-#: ../client/pk-console.c:862
-msgid "Could not find what packages require this package"
-msgstr "No s'han pogut trobar els paquets requerits per a aquest paquet"
+#: ../client/pk-console.c:915
+msgid "Could not find what packages require"
+msgstr "No s'ha trobat cap paquet requerit"
 
-#: ../client/pk-console.c:880
-msgid "Could not get dependencies for this package"
-msgstr "No s'han pogut obtenir les dependències per a aquest paquet"
+#: ../client/pk-console.c:936
+msgid "Could not get dependencies for"
+msgstr "No s'han pogut obtenir les dependències per a"
 
-#: ../client/pk-console.c:898
-msgid "Could not find details for this package"
-msgstr "No s'han pogut trobar els detalls per a aquest paquet"
+#: ../client/pk-console.c:957
+msgid "Could not find details for"
+msgstr "No s'han pogut trobar els detalls per a"
 
-#: ../client/pk-console.c:916
+#: ../client/pk-console.c:980
 msgid "Could not find the files for this package"
 msgstr "No s'han pogut trobar els fitxers per a aquest paquet"
 
-#: ../client/pk-console.c:996
+#: ../client/pk-console.c:987
+msgid "Could not get the file list"
+msgstr "No s'ha pogut obtenir la llista de fitxers"
+
+#: ../client/pk-console.c:1006
+msgid "Could not find the update details for"
+msgstr "No s'han trobat els detalls per a actualitzar"
+
+#: ../client/pk-console.c:1067
 msgid "Package description"
 msgstr "Descripció del paquet"
 
-#: ../client/pk-console.c:1019
+#: ../client/pk-console.c:1100
 msgid "Package files"
 msgstr "Fitxers del paquet"
 
-#: ../client/pk-console.c:1027
+#: ../client/pk-console.c:1108
 msgid "No files"
 msgstr "No hi ha fitxers"
 
 #. get user input
-#: ../client/pk-console.c:1059
+#: ../client/pk-console.c:1140
 msgid "Okay to import key?"
 msgstr "Esteu d'acord en importar la clau?"
 
-#: ../client/pk-console.c:1062
+#: ../client/pk-console.c:1143
 msgid "Did not import key"
 msgstr "No importis la clau"
 
 #. get user input
-#: ../client/pk-console.c:1102
+#: ../client/pk-console.c:1183
 msgid "Do you agree?"
 msgstr "Esteu d'acord?"
 
-#: ../client/pk-console.c:1105
+#: ../client/pk-console.c:1186
 msgid "Did not agree to licence, task will fail"
 msgstr "La llicència no ha estat acceptada, la tasca fallarà"
 
-#: ../client/pk-console.c:1134
+#: ../client/pk-console.c:1215
 msgid "The daemon crashed mid-transaction!"
 msgstr "El servei ha fallat a meitat de la transacció!"
 
 #. header
-#: ../client/pk-console.c:1187
+#: ../client/pk-console.c:1268
 msgid "PackageKit Console Interface"
 msgstr "Interfície de consola de PackageKit"
 
-#: ../client/pk-console.c:1187
+#: ../client/pk-console.c:1268
 msgid "Subcommands:"
 msgstr "Subordres:"
 
-#: ../client/pk-console.c:1290
-#: ../client/pk-monitor.c:104
-#: ../src/pk-main.c:189
+#: ../client/pk-console.c:1378 ../client/pk-generate-pack-main.c:64
+#: ../client/pk-monitor.c:118 ../src/pk-main.c:192
 msgid "Show extra debugging information"
 msgstr "Mostra la informació extra de la depuració"
 
-#: ../client/pk-console.c:1292
-#: ../client/pk-monitor.c:106
+#: ../client/pk-console.c:1380 ../client/pk-monitor.c:120
 msgid "Show the program version and exit"
 msgstr "Mostra la versió del programa i surt"
 
-#: ../client/pk-console.c:1294
+#: ../client/pk-console.c:1382
 msgid "Set the filter, e.g. installed"
 msgstr "Defineix el filtre, p.ex. instal·lat"
 
-#: ../client/pk-console.c:1296
+#: ../client/pk-console.c:1384
 msgid "Exit without waiting for actions to complete"
 msgstr "Surt sense esperar que es completin les accions"
 
-#: ../client/pk-console.c:1319
+#: ../client/pk-console.c:1407
 msgid "Could not connect to system DBUS."
 msgstr "No s'ha pogut connectar al sistema DBUS."
 
-#: ../client/pk-console.c:1413
-msgid "You need to specify a search type"
-msgstr "Cal que especifiqueu un tipus de cerca"
-
-#: ../client/pk-console.c:1418
-#: ../client/pk-console.c:1425
-#: ../client/pk-console.c:1432
-#: ../client/pk-console.c:1439
-#: ../client/pk-console.c:1538
-#: ../client/pk-console.c:1545
-#: ../client/pk-console.c:1552
-#: ../client/pk-console.c:1559
+#: ../client/pk-console.c:1500
+msgid "You need to specify a search type, e.g. name"
+msgstr "Cal que especifiqueu un tipus de cerca, p.e. per nom"
+
+#: ../client/pk-console.c:1505 ../client/pk-console.c:1512
+#: ../client/pk-console.c:1519 ../client/pk-console.c:1526
+#: ../client/pk-console.c:1637 ../client/pk-console.c:1647
+#: ../client/pk-console.c:1654 ../client/pk-console.c:1661
 msgid "You need to specify a search term"
 msgstr "Cal que especifiqueu un terme per a la cerca"
 
-#: ../client/pk-console.c:1444
+#: ../client/pk-console.c:1531
 msgid "Invalid search type"
 msgstr "El tipus de cerca no és vàlid"
 
-#: ../client/pk-console.c:1449
+#: ../client/pk-console.c:1536
 msgid "You need to specify a package or file to install"
 msgstr "Cal que especifiqueu un paquet o un fitxer a instal·lar"
 
-#: ../client/pk-console.c:1456
+#: ../client/pk-console.c:1543
 msgid "You need to specify a type, key_id and package_id"
-msgstr "Cal que especifiqueu un tipus, un identificador de clau i un identificador de paquet"
+msgstr ""
+"Cal que especifiqueu un tipus, un identificador de clau i un identificador "
+"de paquet"
 
-#: ../client/pk-console.c:1463
+#: ../client/pk-console.c:1550
 msgid "You need to specify a package to remove"
 msgstr "Cal que especifiqueu un paquet a eliminar"
 
-#: ../client/pk-console.c:1470
+#: ../client/pk-console.c:1556
+msgid ""
+"You need to specify the destination directory and then the packages to "
+"download"
+msgstr ""
+"Cal que especifiqueu el directori destí i els paquets a baixar"
+
+#: ../client/pk-console.c:1561
+msgid "Directory not found"
+msgstr "No s'ha trobat el directori"
+
+#: ../client/pk-console.c:1567
 msgid "You need to specify a eula-id"
 msgstr "Cal que especifiqueu un identificador de EULA"
 
-#: ../client/pk-console.c:1486
+#: ../client/pk-console.c:1583
 msgid "You need to specify a package name to resolve"
 msgstr "Cal que especifiqueu un nom de paquet a resoldre"
 
-#: ../client/pk-console.c:1493
-#: ../client/pk-console.c:1500
+#: ../client/pk-console.c:1592 ../client/pk-console.c:1599
 msgid "You need to specify a repo name"
 msgstr "Cal que especifiqueu un nom de repositori"
 
-#: ../client/pk-console.c:1507
+#: ../client/pk-console.c:1606
 msgid "You need to specify a repo name/parameter and value"
 msgstr "Cal que especifiqueu un nom / paràmetre de repositori i un valor"
 
-#: ../client/pk-console.c:1520
+#: ../client/pk-console.c:1619
 msgid "You need to specify a time term"
 msgstr "Cal que especifiqueu un valor per a l'hora"
 
-#: ../client/pk-console.c:1525
+#: ../client/pk-console.c:1624
 msgid "You need to specify a correct role"
 msgstr "Cal que especifiqueu un rol correcte"
 
-#: ../client/pk-console.c:1530
+#: ../client/pk-console.c:1629
 msgid "Failed to get last time"
 msgstr "S'ha produït un error en obtenir l'última hora"
 
-#: ../client/pk-console.c:1566
+#: ../client/pk-console.c:1668
 msgid "You need to specify a package to find the details for"
 msgstr "Cal que especifiqueu un paquet per cercar-ne els detalls"
 
-#: ../client/pk-console.c:1573
+#: ../client/pk-console.c:1675
 msgid "You need to specify a package to find the files for"
 msgstr "Cal que especifiqueu un paquet per cercar-ne fitxers"
 
-#: ../client/pk-console.c:1622
+#: ../client/pk-console.c:1724
 #, c-format
 msgid "Option '%s' not supported"
 msgstr "L'opció '%s' no està disponible"
 
-#: ../client/pk-console.c:1633
+#: ../client/pk-console.c:1737
+msgid "You don't have the necessary privileges for this operation"
+msgstr "No teniu suficients privilegis per a aquesta operació"
+
+#: ../client/pk-console.c:1739
 msgid "Command failed"
 msgstr "L'ordre ha fallat"
 
-#: ../client/pk-console.c:1637
-msgid "You don't have the necessary privileges for this operation"
-msgstr "No teniu suficients privilegis per a aquesta operació"
+#: ../client/pk-generate-pack.c:117
+msgid "Could not find a package match"
+msgstr "No s'han trobat coincidències en cap paquet"
+
+#: ../client/pk-generate-pack.c:151
+msgid "failed to download: invalid package_id and/or directory"
+msgstr "no s'ha pogut baixar: directori i/o id de paquet invàlids"
+
+#: ../client/pk-generate-pack.c:232
+msgid "Could not find a valid metadata file"
+msgstr "No s'ha trobat un fitxer de metadades invàlid"
+
+#. get user input
+#: ../client/pk-generate-pack.c:524
+msgid "Okay to download the additional packages"
+msgstr "Esteu d'acord en baixar els paquets adicionals?"
+
+#: ../client/pk-generate-pack-main.c:66
+msgid ""
+"Set the path of the file with the list of packages/dependencies to be "
+"excluded"
+msgstr ""
+"Establiu el camí del fitxer amb la llista de paquets/dependències a excloure"
+
+#: ../client/pk-generate-pack-main.c:111
+msgid "You need to specify the pack name and packages to be packed\n"
+msgstr "Cal que especifiqueu el nom del paquet i els paquets a empaquetar\n"
+
+#: ../client/pk-generate-pack-main.c:117
+msgid ""
+"Invalid name for the service pack, Specify a name with .servicepack "
+"extension\n"
+msgstr ""
+"Nom invàlid per als grup de paquets de servei. Especifiqueu un nom amb l'extensió "
+".servicepack\n"
+
+#: ../client/pk-generate-pack-main.c:129
+msgid "A pack with the same name already exists, do you want to overwrite it?"
+msgstr "Existeix un grup de paquets amb el mateix nom, voleu sobreescriure'l?"
+
+#: ../client/pk-generate-pack-main.c:142
+msgid "Failed to create directory"
+msgstr "S'ha produït un error en crear el directori"
+
+#: ../client/pk-generate-pack-main.c:149
+msgid "Failed to create pack"
+msgstr "S'ha produït un error en crear el grup de paquets"
+
+#: ../client/pk-import-specspo.c:185
+msgid "Could not set database readonly"
+msgstr "No s'ha pogut establir la base de dades a només lectura"
 
-#: ../client/pk-import-desktop.c:298
-#: ../client/pk-import-specspo.c:173
+#: ../client/pk-import-specspo.c:192
 #, c-format
 msgid "Could not open database: %s"
 msgstr "No s'ha pogut obrir la base de dades: %s"
 
-#: ../client/pk-import-desktop.c:299
-#: ../client/pk-import-specspo.c:174
+#: ../client/pk-import-specspo.c:193
 msgid "You probably need to run this program as the root user"
-msgstr "És probable que necessiteu executar aquesta aplicació com a administrador"
+msgstr ""
+"És probable que necessiteu executar aquesta aplicació com a administrador"
 
-#: ../client/pk-monitor.c:117
+#: ../client/pk-monitor.c:131
 msgid "PackageKit Monitor"
 msgstr "Monitorització de Packagekit"
 
+#: ../client/pk-tools-common.c:51
+#, c-format
+msgid "Please enter a number from 1 to %i: "
+msgstr "Si us plau, introduïu un valor d'1 a %i:"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:300
+msgid "Getting package information..."
+msgstr "S'està obtenint la informació de paquets..."
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:304
+#, c-format
+msgid "<span color='#%06x' underline='single' size='larger'>Run %s</span>"
+msgstr "<span color='#%06x' underline='single' size='larger'>Executa %s</span>"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:308
+#: ../contrib/packagekit-plugin/src/contents.cpp:313
+#: ../contrib/packagekit-plugin/src/contents.cpp:336
+#: ../contrib/packagekit-plugin/src/contents.cpp:340
+#, c-format
+msgid "<big>%s</big>"
+msgstr "<big>%s</big>"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:310
+#, c-format
+msgid ""
+"\n"
+"<small>Installed version: %s</small>"
+msgstr ""
+"\n"
+"<small>Versió instal·lada: %s</small>"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:316
+#, c-format
+msgid ""
+"\n"
+"<span color='#%06x' underline='single'>Run version %s now</span>"
+msgstr ""
+"\n"
+"<span color='#%06x' underline='single'>Executa la versió %s ara</span>"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:321
+#, c-format
+msgid ""
+"\n"
+"<span color='#%06x' underline='single'>Run now</span>"
+msgstr ""
+"\n"
+"<span color='#%06x' underline='single'>Executa ara</span>"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:325
+#, c-format
+msgid ""
+"\n"
+"<span color='#%06x' underline='single'>Upgrade to version %s</span>"
+msgstr ""
+"\n"
+"<span color='#%06x' underline='single'>Actualitza a la versió %s</span>"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:330
+#, c-format
+msgid ""
+"<span color='#%06x' underline='single' size='larger'>Install %s Now</span>"
+msgstr ""
+"<span color='#%06x' underline='single' size='larger'>Instal·la %s ara</span>"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:333
+#, c-format
+msgid ""
+"\n"
+"<small>Version: %s</small>"
+msgstr ""
+"\n"
+"<small>Versió: %s</small>"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:337
+msgid ""
+"\n"
+"<small>No packages found for your system</small>"
+msgstr ""
+"\n"
+"<small>No s'han trobat paquets en el vostre sistema</small>"
+
+#: ../contrib/packagekit-plugin/src/contents.cpp:341
+msgid ""
+"\n"
+"<small>Installing...</small>"
+msgstr ""
+"\n"
+"<small>Instal·lant...</small>"
+
 #: ../data/packagekit-catalog.xml.in.h:1
 msgid "PackageKit Catalog"
 msgstr "Catàleg del Packagekit"
 
-#: ../src/pk-main.c:83
+#: ../data/packagekit-pack.xml.in.h:1
+msgid "PackageKit Service Pack"
+msgstr "Grup de paquets de servei del PackageKit"
+
+#: ../src/pk-main.c:85
 msgid "Startup failed due to security policies on this machine."
-msgstr "L'inici ha fallat a causa de les polítiques de seguretat d'aquesta màquina."
+msgstr ""
+"L'inici ha fallat a causa de les polítiques de seguretat d'aquesta màquina."
 
-#: ../src/pk-main.c:84
+#: ../src/pk-main.c:86
 msgid "This can happen for two reasons:"
 msgstr "Això pot succeir per dos raons:"
 
-#: ../src/pk-main.c:85
+#: ../src/pk-main.c:87
 msgid "The correct user is not launching the executable (usually root)"
-msgstr "Un usuari incorrecte està executant l'aplicació (normalment és el superusuari root)"
+msgstr ""
+"Un usuari incorrecte està executant l'aplicació (normalment és el "
+"superusuari root)"
 
-#: ../src/pk-main.c:86
-msgid "The org.freedesktop.PackageKit.conf file is not installed in the system /etc/dbus-1/system.d directory"
-msgstr "El fitxer org.freedesktop.PackageKit.conf no està instal·lat al directori del sistema /etc/dbus-1/system.d"
+#: ../src/pk-main.c:88
+msgid ""
+"The org.freedesktop.PackageKit.conf file is not installed in the system /etc/"
+"dbus-1/system.d directory"
+msgstr ""
+"El fitxer org.freedesktop.PackageKit.conf no està instal·lat al directori "
+"del sistema /etc/dbus-1/system.d"
 
-#: ../src/pk-main.c:185
+#: ../src/pk-main.c:188
 msgid "Packaging backend to use, e.g. dummy"
 msgstr "Administrador de paquets a usar, p.ex. dummy"
 
-#: ../src/pk-main.c:187
+#: ../src/pk-main.c:190
 msgid "Daemonize and detach from the terminal"
 msgstr "Inicia el servei i separa del terminal"
 
-#: ../src/pk-main.c:191
+#: ../src/pk-main.c:194
 msgid "Disable the idle timer"
 msgstr "Desactiva el temporitzador d'inactivitat"
 
-#: ../src/pk-main.c:193
+#: ../src/pk-main.c:196
 msgid "Show version and exit"
 msgstr "Mostra la versió i surt"
 
-#: ../src/pk-main.c:195
+#: ../src/pk-main.c:198
 msgid "Exit after a small delay"
 msgstr "Surt després d'una petita pausa"
 
-#: ../src/pk-main.c:197
+#: ../src/pk-main.c:200
 msgid "Exit after the engine has loaded"
 msgstr "Surt després de que el motor s'hagi cargat"
 
-#: ../src/pk-main.c:207
+#: ../src/pk-main.c:210
 msgid "PackageKit service"
 msgstr "Servei del PackageKit"
 
-#: ../src/pk-main.c:233
+#: ../src/pk-main.c:246
 msgid "Cannot connect to the system bus"
 msgstr "No s'ha pogut connectar al bus del sistema"
 
-#: ../src/pk-main.c:273
+#: ../src/pk-main.c:286
 #, c-format
 msgid "Error trying to start: %s\n"
 msgstr "S'ha produït un error en intentar iniciar: %s\n"
 
+#~ msgid ""
+#~ "Could not find a package with that name to install, or package already "
+#~ "installed"
+#~ msgstr ""
+#~ "No s'ha pogut trobar un paquet amb aquest nom per instal·lar, o el paquet "
+#~ "ja es troba instal·lat"
+
+#~ msgid "Could not find a package with that name to update"
+#~ msgstr "No s'ha pogut trobar un paquet amb aquest nom per actualitzar"
commit 74a4ec7f8e3c2bfb5578faf33124b0379714b8e2
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Sep 28 16:53:29 2008 +0100

    yum: remove some insane pylint suggestions (sorry Tim :-)

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 9441476..90f85a6 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -282,7 +282,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
             if FILTER_COLLECTIONS in fltlist:
                 return
 
-            for (pkg, _) in res:
+            for (pkg, inst) in res:
                 if pkg.repo.id == 'installed':
                     installed.append(pkg)
                 else:
@@ -524,7 +524,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         # download each package
         for package in package_ids:
             self.percentage(percentage)
-            pkg, _ = self._findPackage(package)
+            pkg, inst = self._findPackage(package)
             # if we couldn't map package_id -> pkg
             if not pkg:
                 self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, "Could not find the package %s" % package)
@@ -575,7 +575,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         grp = None
         if len(package_id.split(';')) > 1:
             # Split up the id
-            (name, _, _, repo) = self.get_package_from_id(package_id)
+            (name, idver, a, repo) = self.get_package_from_id(package_id)
             if repo == 'meta':
                 grp = self.yumbase.comps.return_group(name)
                 if not grp:
@@ -751,7 +751,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
 
         # first try and find the highest EVR package that is already installed
         for pkgi in pkglist:
-            n, a, e, v, _ = pkgi.pkgtup
+            n, a, e, v, r = pkgi.pkgtup
             pkgs = self.yumbase.rpmdb.searchNevra(name=n, epoch=e, ver=v, arch=a)
             for pkg in pkgs:
                 if best:
@@ -907,7 +907,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
                 pkgs = self._get_group_packages(grp)
                 grp_pkgs.extend(pkgs)
             else:
-                pkg, _ = self._findPackage(package)
+                pkg, inst = self._findPackage(package)
                 if pkg:
                     resolve_list.append(pkg)
                 else:
@@ -1272,7 +1272,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         txmbrs = []
         try:
             for package in package_ids:
-                pkg, _ = self._findPackage(package)
+                pkg, inst = self._findPackage(package)
                 if pkg:
                     txmbr = self.yumbase.update(po=pkg)
                     txmbrs.extend(txmbr)
@@ -1418,7 +1418,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
                 self.details(package_id, "", group, desc, "", size)
 
             else:
-                pkg, _ = self._findPackage(package)
+                pkg, inst = self._findPackage(package)
                 if pkg:
                     self._show_details_pkg(pkg)
                 else:
@@ -1442,7 +1442,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         self.status(STATUS_INFO)
 
         for package in package_ids:
-            pkg, _ = self._findPackage(package)
+            pkg, inst = self._findPackage(package)
             if pkg:
                 files = pkg.returnFileEntries('dir')
                 files.extend(pkg.returnFileEntries()) # regular files
@@ -1683,7 +1683,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         self.percentage(None)
         self.status(STATUS_INFO)
         for package in package_ids:
-            pkg, _ = self._findPackage(package)
+            pkg, inst = self._findPackage(package)
             update = self._get_updated(pkg)
             obsolete = self._get_obsoleted(pkg.name)
             desc, urls, reboot, changelog, state, issued, updated = self._get_update_extras(pkg)
@@ -1715,7 +1715,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         self.allow_cancel(True)
         self.percentage(None)
         self.status(STATUS_INFO)
-        pkg, _ = self._findPackage(package)
+        pkg, inst = self._findPackage(package)
         if pkg:
             try:
                 self.yumbase.getKeyForPackage(pkg, askcb = lambda x, y, z: True)
diff --git a/python/packagekit/pylint.sh b/python/packagekit/pylint.sh
index e1eb226..95b6d61 100755
--- a/python/packagekit/pylint.sh
+++ b/python/packagekit/pylint.sh
@@ -1 +1 @@
-pylint --disable-msg=W0614,C0301,C0103,W0613,C0111,R0913,R0904,R0903,C0302,W0401,R0912,R0914,R0911,R0915,R0902 $1
+pylint --disable-msg=W0614,C0301,C0103,W0613,C0111,R0913,R0904,R0903,C0302,W0401,R0912,R0914,R0911,R0915,R0902,W0612 $1
commit c03262e62aff181dc0edde88fbf2f591e502709b
Merge: de9e011... 4b95b40...
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Sun Sep 28 13:06:13 2008 +0200

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

commit de9e011299918064b0314c6940e363f50ad5984c
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Sun Sep 28 13:04:51 2008 +0200

    APT: Several small fixes to the dpkg calls: only apply changes to the
    cache if there are additional dependencies to install. fix a typo in
    _unlock_cache call. return in the case of an exception.

diff --git a/backends/apt/aptDBUSBackend.py b/backends/apt/aptDBUSBackend.py
index e3d4e21..07b67ba 100755
--- a/backends/apt/aptDBUSBackend.py
+++ b/backends/apt/aptDBUSBackend.py
@@ -250,7 +250,7 @@ class DpkgInstallProgress(apt.progress.InstallProgress):
         Install the given package using a dpkg command line call
         """
         cmd = ["/usr/bin/dpkg", "--status-fd", str(self.writefd), "-i"]
-        cmd.extend(filenames)
+        cmd.extend(map(lambda f: str(f), filenames))
         self.run(cmd)
 
     def run(self, cmd):
@@ -400,7 +400,7 @@ class PackageKitInstallProgress(apt.progress.InstallProgress):
 
     def startUpdate(self):
         # The apt system lock was set by _lock_cache() before
-        self._backend.unlock_cache()
+        self._backend._unlock_cache()
         self._backend.StatusChanged(STATUS_COMMIT)
         self.last_activity = time.time()
         self.start_time = time.time()
@@ -1240,15 +1240,16 @@ class PackageKitAptBackend(PackageKitBaseBackend):
                 return
             dependencies.extend(install)
         # Install all dependecies before
-        try:
-            for dep in dependencies:
-                self._cache[dep].markInstall()
-        except:
-            self._cache.clear()
-            self.ErrorCode(ERROR_DEP_RESOLUTION_FAILED, "")
-            self.Finished(EXIT_FAILED)
-            return
-        if not self._commit_changes((10,25), (25,50)): return False
+        if len(dependencies) > 0:
+            try:
+                for dep in dependencies:
+                    self._cache[dep].markInstall()
+            except:
+                self._cache.clear()
+                self.ErrorCode(ERROR_DEP_RESOLUTION_FAILED, "")
+                self.Finished(EXIT_FAILED)
+                return
+            if not self._commit_changes((10,25), (25,50)): return False
         # Check for later available packages
         for deb in packages:
             # Check if there is a newer version in the cache
@@ -1257,7 +1258,6 @@ class PackageKitAptBackend(PackageKitBaseBackend):
                              "There is a later version of %s "
                              "available in the repositories." % deb.pkgname)
         # Install the Debian package files
-        if not self._lock_cache(): return
         d = PackageKitDpkgInstallProgress(self)
         try:
             d.startUpdate()
@@ -1272,10 +1272,12 @@ class PackageKitAptBackend(PackageKitBaseBackend):
                            "This can be caused by maintainer scripts which "
                            "require input on the terminal:\n%s" % e.message)
             self.Finished(EXIT_KILLED)
+            return
         except PackageManagerFailedPKError, e:
             self._recover()
             self.ErrorCode(ERROR_UNKNOWN, "%s\n%s" % (e.message, e.output))
             self.Finished(EXIT_FAILED)
+            return
         except Exception, e:
             self._recover()
             self.ErrorCode(ERROR_INTERNAL_ERROR, e.message)
commit 4b95b40d193fdfaf76c54a240022b6471c53fdb7
Merge: 7b424ad... ce839a1...
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Sep 28 11:59:21 2008 +0100

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

commit 7b424ad12d802eb5384ac06816b9d37b853d3204
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Sep 28 11:55:40 2008 +0100

    trivial: add the convenience helper pk_package_ids_from_text()

diff --git a/libpackagekit/pk-package-ids.c b/libpackagekit/pk-package-ids.c
index 2c1f787..cac7f9a 100644
--- a/libpackagekit/pk-package-ids.c
+++ b/libpackagekit/pk-package-ids.c
@@ -57,6 +57,21 @@ pk_package_ids_from_id (const gchar *package_id)
 }
 
 /**
+ * pk_package_ids_from_text:
+ * @package_id: A single package_id
+ *
+ * Form a composite string array of package_id's from
+ * a delimited string
+ *
+ * Return value: the string array, or %NULL if invalid, free with g_strfreev()
+ **/
+gchar **
+pk_package_ids_from_text (const gchar *package_id)
+{
+	return g_strsplit (package_id, PK_PACKAGE_IDS_DELIM, 0);
+}
+
+/**
  * pk_package_ids_from_array:
  * @array: the GPtrArray of package_id's
  *
diff --git a/libpackagekit/pk-package-ids.h b/libpackagekit/pk-package-ids.h
index c1a2a44..809cd95 100644
--- a/libpackagekit/pk-package-ids.h
+++ b/libpackagekit/pk-package-ids.h
@@ -40,6 +40,7 @@ G_BEGIN_DECLS
 #define PK_PACKAGE_IDS_DELIM	"&"
 
 gchar		**pk_package_ids_from_id		(const gchar	*package_id);
+gchar		**pk_package_ids_from_text		(const gchar	*package_id);
 gchar		**pk_package_ids_from_array		(GPtrArray	*array);
 gchar		**pk_package_ids_from_va_list		(const gchar	*package_id_first,
 							 va_list	*args);
commit ce839a1851fafb4e5e367439b83a37b96f15d9b5
Author: Sebastian Heinlein <devel at glatzor.de>
Date:   Sun Sep 28 12:21:11 2008 +0200

    APT: Do not require to lock the cache before running dpkg. apt_pkg's
    cache lock fails if not all packages are configured from which we try to
    _recover()

diff --git a/backends/apt/aptDBUSBackend.py b/backends/apt/aptDBUSBackend.py
index 91a7754..e3d4e21 100755
--- a/backends/apt/aptDBUSBackend.py
+++ b/backends/apt/aptDBUSBackend.py
@@ -400,7 +400,7 @@ class PackageKitInstallProgress(apt.progress.InstallProgress):
 
     def startUpdate(self):
         # The apt system lock was set by _lock_cache() before
-        apt_pkg.PkgSystemUnLock()
+        self._backend.unlock_cache()
         self._backend.StatusChanged(STATUS_COMMIT)
         self.last_activity = time.time()
         self.start_time = time.time()
@@ -1667,7 +1667,6 @@ class PackageKitAptBackend(PackageKitBaseBackend):
         self.StatusChanged(STATUS_CLEANUP)
         self.NoPercentageUpdates()
         try:
-            apt_pkg.PkgSystemLock()
             d = PackageKitDpkgInstallProgress(self)
             d.startUpdate()
             d.recover()
commit c64650f19c91ddb5f5e128c4f5a194651c4e3192
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Sun Sep 28 11:51:47 2008 +0200

    trivial: make both linebreaks weird

diff --git a/backends/smart/smartBackend.py b/backends/smart/smartBackend.py
index 5bfd671..8e3eee0 100755
--- a/backends/smart/smartBackend.py
+++ b/backends/smart/smartBackend.py
@@ -1089,7 +1089,8 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
         group = info.getGroup()
         if group in self.GROUPS:
             package = info.getPackage().name
-            if group == 'User Interface/X' and package.find('-fonts') != -1:
+            if group == 'User Interface/X' and \
+            package.find('-fonts') != -1:
                 return GROUP_FONTS
             if group == 'Applications/Productivity' and \
             package.find('-langpack') != -1:
commit 0ed01a3766232d3a27516b7e2111b25e01dd0f7e
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Sun Sep 28 11:43:19 2008 +0200

    smart: look for apt metapackages as well as yum/yast

diff --git a/backends/smart/smartBackend.py b/backends/smart/smartBackend.py
index e33807f..5bfd671 100755
--- a/backends/smart/smartBackend.py
+++ b/backends/smart/smartBackend.py
@@ -1012,7 +1012,10 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
         return channels
 
     def _package_is_collection(self, package):
-        return package.name.startswith('^')
+        loader = package.loaders.keys()[0]
+        info = loader.getInfo(package)
+        return package.name.startswith('^') or \
+               info.getGroup() == 'metapackages'
 
     def _add_package(self, package, status=None):
         if not status:
commit 79ebcc08679412ecc8f3a4ea23fc55ca9d464f80
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Sun Sep 28 10:59:37 2008 +0200

    trivial: add missing symlink

diff --git a/backends/smart/packagekit b/backends/smart/packagekit
new file mode 120000
index 0000000..50227aa
--- /dev/null
+++ b/backends/smart/packagekit
@@ -0,0 +1 @@
+../../python/packagekit
\ No newline at end of file
commit 013a4b46a811b7fef2f1a8f2c503540df2da67dc
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Sun Sep 28 10:14:58 2008 +0200

    smart: pathlist implemented for rpm-md, so remove search_file comment

diff --git a/backends/smart/smartBackend.py b/backends/smart/smartBackend.py
index 690b591..e33807f 100755
--- a/backends/smart/smartBackend.py
+++ b/backends/smart/smartBackend.py
@@ -783,7 +783,6 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
             channels = self._search_channels(packageid)
 
             package = packages[0]
-            # FIXME: Only installed packages have path lists.
             paths = None
             for loader in package.loaders:
                 if channels and loader.getChannel() not in channels:
commit fe0c240266eb488be04b392a6e5f63334607e3c1
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Sun Sep 28 10:10:13 2008 +0200

    trivial: add smart TODO

diff --git a/backends/smart/smartBackend.py b/backends/smart/smartBackend.py
index 69f88e6..690b591 100755
--- a/backends/smart/smartBackend.py
+++ b/backends/smart/smartBackend.py
@@ -29,6 +29,9 @@ from packagekit.enums import *
 import re
 import sys
 
+# TODO: move Groups to a separate class (including the lookup table)
+# TODO: move Filter to a separate class (and use "PackagekitFilter")
+
 # Global vars
 pkprogress = PackagekitProgress()
 pkpackage = PackagekitPackage()
commit d5bba0fab0b76668da037a2dcb5ef5b6e808c6a1
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Sun Sep 28 09:59:24 2008 +0200

    trivial: add packagekit.progress for... erhm, future use

diff --git a/backends/smart/smartBackend.py b/backends/smart/smartBackend.py
index 25d38a9..69f88e6 100755
--- a/backends/smart/smartBackend.py
+++ b/backends/smart/smartBackend.py
@@ -23,12 +23,14 @@ from smart.interface import Interface
 from smart.progress import Progress
 from smart.fetcher import Fetcher
 from packagekit.backend import PackageKitBaseBackend
+from packagekit.progress import PackagekitProgress
 from packagekit.package import PackagekitPackage
 from packagekit.enums import *
 import re
 import sys
 
 # Global vars
+pkprogress = PackagekitProgress()
 pkpackage = PackagekitPackage()
 
 def needs_cache(func):


More information about the PackageKit-commit mailing list