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

Richard Hughes hughsient at kemper.freedesktop.org
Wed Aug 27 04:50:06 PDT 2008


 NEWS                                             |   55 ++++++++++++++++
 backends/smart/helpers/install-packages.py       |    2 
 backends/smart/helpers/remove-packages.py        |    9 +-
 backends/smart/helpers/smartBackend.py           |   14 ++--
 backends/smart/helpers/update-packages.py        |    4 -
 backends/urpmi/helpers/perl_packagekit/prints.pm |    2 
 contrib/PackageKit.spec.in                       |    3 
 docs/html/pk-download.html                       |    1 
 docs/html/pk-using.html                          |    2 
 libpackagekit/pk-client.c                        |   77 ++++++++++++++++++++++-
 libpackagekit/pk-control.c                       |    1 
 libpackagekit/pk-debug.c                         |    3 
 src/pk-transaction.c                             |    9 ++
 13 files changed, 161 insertions(+), 21 deletions(-)

New commits:
commit f38a70e36cf3087e978de488dd383190e8d6ba25
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Aug 27 12:46:08 2008 +0100

    Release version 0.3.1

diff --git a/NEWS b/NEWS
index dc37283..8f3c15b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,58 @@
+Version 0.3.1
+~~~~~~~~~~~~~~
+Released: 2008-08-27
+
+New Features:
+ - Add new API for GetDistroUpgrades() and ::DistroUpgrade() (Richard Hughes)
+ - Change DownloadPackages() so we get the correct SELinux contexts (Richard Hughes)
+ - Change Service Packs extension from .pack to .servicepack (Shishir Goel)
+ - Set "directory" as an argument for DownloadPackages() (Marcin Banasiak)
+ - Switch to using a guint64 bitfield type (Richard Hughes)
+ - Make PkMessages into proper enumerated types (Richard Hughes)
+ - Make sure the backends are respecting the installed filter (Richard Hughes)
+ - Remove the libtar code, and instead use the libarchive library (Richard Hughes)
+
+Bugfixes:
+ - Fix compiling the browser plugins with a new gtk (Richard Hughes)
+ - Don't crash the daemon if we never called SetLocale. Fixes fd#17298 (Richard Hughes)
+ - Don't allow reset (if sync) or cancel in ::Finished() (Richard Hughes)
+ - Fix a memory leak in RemovePackages (Shishir Goel)
+ - Clarify some documentation about the transaction methods (Richard Hughes)
+ - Build fix for pk-import-desktop (Sebastian Heinlein)
+ - Don't crash the 64 bit client tools when the daemon exits (Richard Hughes)
+ - Fix compile by adding add locale.h include (Scott Reeves)
+
+Backends:
+ - apt: Add support for Ubuntu supported filter (Sebastian Heinlein)
+ - apt: Fix filtering. Was totally broken (Sebastian Heinlein)
+ - apt: Fix wrong use of the STATUS_SETUP in doInit() (Sebastian Heinlein)
+ - apt: implement GetFiles (Sebastian Heinlein)
+ - apt: Instead of sending an empty file list for a package send none (Sebastian Heinlein)
+ - apt: support the new groups science, doc and electronics (Sebastian Heinlein)
+ - apt: do not report the package itself on GetDepends (Sebastian Heinlein)
+ - apt: Implement InstallFiles (Sebastian Heinlein)
+ - apt: Send a message if a newer package exists (Sebastian Heinlein)
+ - apt: fix killing hanging installations (Sebastian Heinlein)
+ - apt: Do not allow to remove essential packages (Sebastian Heinlein)
+ - apt: Add method for calling InstallFiles in the dbus backend (Sebastian Heinlein)
+ - conary: update to support {install,remove}-packages (Ken VanDine)
+ - conary: more updates to work with 0.3.x series (Ken VanDine)
+ - poldek: support multiple package_ids in GetFiles (Marcin Banasiak)
+ - poldek: make execute_* functions use va_list (Marcin Banasiak)
+ - poldek: fix crash (Marcin Banasiak)
+ - poldek: get localized descriptions and summaries (Marcin Banasiak)
+ - poldek: removed backend reference count (Marcin Banasiak)
+ - poldek: use source name as repo description (Marcin Banasiak)
+ - poldek: pass changes to GetUpdateDetail() (Marcin Banasiak)
+ - poldek: support documentation group (Marcin Banasiak)
+ - smart: use alias if channel has no name (Anders F Bjorklund)
+ - smart: GetDetails should be getDescription (Anders F Bjorklund)
+ - smart: match helpers with backend (Anders F Bjorklund)
+ - smart: use PackagekitPackage (Anders F Bjorklund)
+ - urpmi: make updatedetail signal compatible with 0.3.X (Aurelien Lefebvre)
+ - yum: fix InstallFile to make it work for multiple simultaneous packs (Shishir Goel)
+ - zypp: finish the switch to PkBitfield (Scott Reeves)
+
 Version 0.3.0
 ~~~~~~~~~~~~~~
 Released: 2008-08-18
diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index 2d529c2..b746c71 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -6,7 +6,7 @@
 
 %{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
-Summary:   System daemon that is a DBUS abstraction layer for packages
+Summary:   System daemon that is a DBUS abstraction layer for package management
 Name:      PackageKit
 Version:   #VERSION#
 Release:   0.#BUILD#%{?alphatag}%{?dist}
diff --git a/docs/html/pk-download.html b/docs/html/pk-download.html
index b7044ee..ec0bf8a 100644
--- a/docs/html/pk-download.html
+++ b/docs/html/pk-download.html
@@ -51,6 +51,7 @@ Latest Supported Versions:
 <table>
 <tr><td><b>Version</b></td><td>&nbsp;&nbsp;</td><td><b>Date</b></td></tr>
 <tr><td>0.3.0</td><td></td><td>2008-08-18</td></tr>
+<tr><td>0.3.1</td><td></td><td>2008-08-27</td></tr>
 </table>
 <h3>
 ABI Stable Versions:
diff --git a/docs/html/pk-using.html b/docs/html/pk-using.html
index a7026b9..4fbbb0c 100644
--- a/docs/html/pk-using.html
+++ b/docs/html/pk-using.html
@@ -25,7 +25,7 @@ The <code>pkcon</code> text-mode program allows you to interact with
 PackageKit on the command. For example:
 </p>
 <pre>
-[hughsie at laptop ~]$ pkcon get updates
+[hughsie at laptop ~]$ pkcon get-updates
 [hughsie at hughsie-work PackageKit]$ pkcon get-updates
 security    	bluez-utils-3.35-3.fc9                  	Bluetooth utilities
 bugfix      	xterm-236-1.fc9                         	Terminal emulator for the X Window System
commit 71f99a9126777bc5aaddabe54dfc3bd6b7475051
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Wed Aug 27 12:52:45 2008 +0200

    fix copy/paste typo

diff --git a/backends/smart/helpers/remove-packages.py b/backends/smart/helpers/remove-packages.py
index ad60dfb..173037b 100755
--- a/backends/smart/helpers/remove-packages.py
+++ b/backends/smart/helpers/remove-packages.py
@@ -15,7 +15,7 @@ import sys
 from smartBackend import PackageKitSmartBackend
 
 package = sys.argv[1]
-backend = smartBackend.PackageKitSmartBackend(sys.argv[1:])
+backend = PackageKitSmartBackend(sys.argv[1:])
 backend.remove(package)
 
 sys.exit(0)
commit 2f1a005cb01cdb16bf3006eb5d0cf0ee51ac808e
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Wed Aug 27 12:17:29 2008 +0200

    smart: use alias if channel has no name

diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index d427af5..4e30a97 100644
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -271,11 +271,12 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
         channels = smart.sysconf.get("channels", ())
         for alias in channels:
             channel = smart.sysconf.get(("channels", alias))
+            name = channel.get("name", alias)
             parsed = smart.channel.parseChannelData(channel)
             enabled = 'true'
             if channel.has_key('disabled') and channel['disabled'] == 'yes':
                 enabled = 'false'
-            self.repo_detail(alias, channel['name'], enabled)
+            self.repo_detail(alias, name, enabled)
 
     def repo_enable(self, repoid, enable):
         if smart.sysconf.has(("channels", repoid)):
commit 0463b269069b20018eb2e10d55142d2aeab3ed55
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Wed Aug 27 12:15:51 2008 +0200

    smart: GetDetails should be getDescription

diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index e11dfa5..d427af5 100644
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -170,7 +170,7 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
         for package in packages:
             if self._passes_filters(package, filters):
                 info = package.loaders.keys()[0].getInfo(package)
-                if searchstring in info.GetDetails():
+                if searchstring in info.getDescription():
                     self._show_package(package)
 
     def refresh_cache(self):
@@ -198,7 +198,7 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
             info = infos[0]
 
             version, arch = package.version.split('@')
-            description = info.GetDetails()
+            description = info.getDescription()
             description = description.replace("\n\n", ";")
             description = description.replace("\n", " ")
             urls = info.getReferenceURLs()
commit 2acd43d25a5d98a829fe62983927b7fa0ead43cb
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Wed Aug 27 12:13:44 2008 +0200

    smart: match helpers with backend

diff --git a/backends/smart/helpers/install-packages.py b/backends/smart/helpers/install-packages.py
index d527e1c..d1c8c7b 100755
--- a/backends/smart/helpers/install-packages.py
+++ b/backends/smart/helpers/install-packages.py
@@ -16,5 +16,5 @@ from smartBackend import PackageKitSmartBackend
 
 package = sys.argv[1]
 backend = PackageKitSmartBackend(sys.argv[1:])
-backend.install_packages(package)
+backend.install(package)
 sys.exit(0)
diff --git a/backends/smart/helpers/remove-packages.py b/backends/smart/helpers/remove-packages.py
index 393ae01..ad60dfb 100755
--- a/backends/smart/helpers/remove-packages.py
+++ b/backends/smart/helpers/remove-packages.py
@@ -11,10 +11,11 @@
 # (at your option) any later version.
 
 import sys
-import smartBackend
 
+from smartBackend import PackageKitSmartBackend
 
-backend = smartBackend.PackageKitSmartBackend(sys.argv[2:])
-backend.remove_packages(sys.argv[1], sys.argv[2])
+package = sys.argv[1]
+backend = smartBackend.PackageKitSmartBackend(sys.argv[1:])
+backend.remove(package)
 
-sys.exit()
+sys.exit(0)
diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index 5de3a6a..e11dfa5 100644
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -85,7 +85,7 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
         self.ctrl.commitTransaction(trans, confirm=False)
 
     @needs_cache
-    def remove(self, allowdeps, packageid):
+    def remove(self, packageid):
         ratio, results, suggestions = self._search_packageid(packageid)
 
         packages = self._process_search_results(results)
diff --git a/backends/smart/helpers/update-packages.py b/backends/smart/helpers/update-packages.py
index 40fa46c..efbd5a1 100755
--- a/backends/smart/helpers/update-packages.py
+++ b/backends/smart/helpers/update-packages.py
@@ -14,7 +14,7 @@ import sys
 
 from smartBackend import PackageKitSmartBackend
 
-packages = sys.argv[1]
+package = sys.argv[1]
 backend = PackageKitSmartBackend(sys.argv[1:])
-backend.update_packages(packages)
+backend.update(package)
 sys.exit(0)
commit f9c979a521e20c9a635824eeef7495e2dadbeab1
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date:   Wed Aug 27 12:09:04 2008 +0200

    smart: use PackagekitPackage

diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index aeac569..5de3a6a 100644
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -21,7 +21,10 @@ from packagekit.backend import PackageKitBaseBackend, INFO_INSTALLED, \
         INFO_AVAILABLE, INFO_NORMAL, FILTER_NOT_INSTALLED, FILTER_INSTALLED, \
         INFO_SECURITY, INFO_BUGFIX, INFO_ENHANCEMENT, \
         ERROR_REPO_NOT_FOUND, ERROR_PACKAGE_ALREADY_INSTALLED
+from packagekit.package import PackagekitPackage
 
+# Global vars
+pkpackage = PackagekitPackage()
 
 def needs_cache(func):
     """ Load smart's channels, and save the cache when done. """
@@ -303,7 +306,7 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
             if package.installed and not channel.getType().endswith('-sys'):
                 continue
             info = loader.getInfo(package)
-            self.package(self.get_package_id(package.name, version, arch,
+            self.package(pkpackage.get_package_id(package.name, version, arch,
                 channel.getAlias()), status, info.getSummary())
 
     def _get_status(self, package):
commit a552a7b8d7945692da9aa8f6349c763ee9737f59
Merge: d7eb3b7... 73fb3c0...
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Aug 27 10:43:14 2008 +0100

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

commit d7eb3b7b4c8af84d82c42a727d08bc4adf722d6d
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Aug 27 10:42:24 2008 +0100

    bugfix: properly disconnect the disconnect handler so we don't crash the client tools when the daemon exits

diff --git a/libpackagekit/pk-client.c b/libpackagekit/pk-client.c
index b5673d5..bf2be6c 100644
--- a/libpackagekit/pk-client.c
+++ b/libpackagekit/pk-client.c
@@ -85,6 +85,7 @@ struct _PkClientPrivate
 	PkControl		*control;
 	PkPackageList		*package_list;
 	PkConnection		*pconnection;
+	gulong			 pconnection_signal_id;
 	PkRestartEnum		 require_restart;
 	PkStatusEnum		 last_status;
 	PkRoleEnum		 role;
@@ -3909,8 +3910,8 @@ pk_client_init (PkClient *client)
 
 	/* watch for PackageKit on the bus, and try to connect up at start */
 	client->priv->pconnection = pk_connection_new ();
-	g_signal_connect (client->priv->pconnection, "connection-changed",
-			  G_CALLBACK (pk_connection_changed_cb), client);
+	client->priv->pconnection_signal_id = g_signal_connect (client->priv->pconnection, "connection-changed",
+								G_CALLBACK (pk_connection_changed_cb), client);
 	if (pk_connection_valid (client->priv->pconnection)) {
 		pk_client_connect (client);
 	}
@@ -4021,6 +4022,7 @@ pk_client_finalize (GObject *object)
 	g_main_loop_unref (client->priv->loop);
 
 	/* disconnect signal handlers */
+	g_signal_handler_disconnect (client->priv->pconnection, client->priv->pconnection_signal_id);
 	pk_client_disconnect_proxy (client);
 	g_object_unref (client->priv->pconnection);
 	g_object_unref (client->priv->package_list);
commit 73fb3c06832d972f3c18ab86c045c422c8acfb82
Author: Aurelien Lefebvre <alefebvre at mandriva.com>
Date:   Wed Aug 27 11:28:20 2008 +0200

    urpmi backend: Little fix to make updatedetail signal compatible with 0.3.X version of PK (Best implementation TODO)

diff --git a/backends/urpmi/helpers/perl_packagekit/prints.pm b/backends/urpmi/helpers/perl_packagekit/prints.pm
index 7411ca9..5ac0eb4 100644
--- a/backends/urpmi/helpers/perl_packagekit/prints.pm
+++ b/backends/urpmi/helpers/perl_packagekit/prints.pm
@@ -61,7 +61,7 @@ sub pk_print_update_detail {
   # @param restart:
   # @param update_text:
   my ($id, $updates, $obsoletes, $vendor_url, $bugzilla_url, $cve_url, $restart, $update_text) = @_;
-  printf("updatedetail\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", $id, $updates, $obsoletes, $vendor_url, $bugzilla_url, $cve_url, $restart, $update_text);
+  printf("updatedetail\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", $id, $updates, $obsoletes, $vendor_url, $bugzilla_url, $cve_url, $restart, $update_text, '', '', '', '');
 }
     
 sub pk_print_require_restart {
commit 126ee23f286239b4c526d2cbec3f8831b1a3e2b2
Merge: 51365b5... 6a81083...
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Aug 27 08:59:20 2008 +0100

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

commit 6a8108396c5824e615de0bc8089df11343509f4c
Author: Scott Reeves <sreeves at novell.com>
Date:   Tue Aug 26 17:08:10 2008 -0600

    fix compile (add locale.h include)

diff --git a/libpackagekit/pk-control.c b/libpackagekit/pk-control.c
index f86e4d3..2217e98 100644
--- a/libpackagekit/pk-control.c
+++ b/libpackagekit/pk-control.c
@@ -27,6 +27,7 @@
 #include <errno.h>
 
 #include <string.h>
+#include <locale.h>
 #include <sys/time.h>
 #include <sys/types.h>
 #ifdef HAVE_UNISTD_H
commit 51365b51a79791d9456329612cdfb4eb7d4b7f24
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Aug 26 17:03:55 2008 +0100

    trivial: the yum backend requires python-sqlite2

diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index e39f329..2d529c2 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -24,6 +24,7 @@ Requires: yum-packagekit = %{epoch}:%{version}-%{release}
 Requires: yum >= 3.2.6
 Requires: libarchive
 Requires: shared-mime-info
+Requires: python-sqlite2
 
 BuildRequires: glib2-devel >= %{glib2_version}
 BuildRequires: dbus-devel  >= %{dbus_version}
commit 5ab7dd9511816047f78e98480858a99283dc5ec0
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Aug 26 10:34:51 2008 +0100

    bugfix: don't allow reset in ::Finished() if we are sync, and don't allow Cancel in ::finished ever.

diff --git a/libpackagekit/pk-client.c b/libpackagekit/pk-client.c
index 1ce2a47..b5673d5 100644
--- a/libpackagekit/pk-client.c
+++ b/libpackagekit/pk-client.c
@@ -78,6 +78,7 @@ struct _PkClientPrivate
 	DBusGProxy		*proxy;
 	GMainLoop		*loop;
 	gboolean		 is_finished;
+	gboolean		 is_finishing;
 	gboolean		 use_buffer;
 	gboolean		 synchronous;
 	gchar			*tid;
@@ -499,8 +500,15 @@ pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime,
 	/* only this instance is finished, and do it before the signal so we can reset */
 	client->priv->is_finished = TRUE;
 
+	/* we are finishing, so we can detect when we try to do insane things
+	 * in the ::Finished() handler */
+	client->priv->is_finishing = TRUE;
+
 	g_signal_emit (client, signals [PK_CLIENT_FINISHED], 0, exit, runtime);
 
+	/* done callback */
+	client->priv->is_finishing = FALSE;
+
 	/* exit our private loop */
 	if (client->priv->synchronous) {
 		g_main_loop_quit (client->priv->loop);
@@ -1089,6 +1097,13 @@ pk_client_cancel (PkClient *client, GError **error)
 		return TRUE;
 	}
 
+	/* we cannot cancel a client in ::Finished() */
+	if (client->priv->is_finishing) {
+		pk_client_error_set (error, PK_CLIENT_ERROR_FAILED,
+				     "unable to cancel client in finished handler");
+		return FALSE;
+	}
+
 	ret = dbus_g_proxy_call (client->priv->proxy, "Cancel", &error_local,
 				 G_TYPE_INVALID, G_TYPE_INVALID);
 	/* no error to process */
@@ -3804,6 +3819,15 @@ pk_client_reset (PkClient *client, GError **error)
 	g_return_val_if_fail (PK_IS_CLIENT (client), FALSE);
 	g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
+	/* we cannot reset a synchronous client in ::Finished() --
+	   the whole point of a sync client is we don't handle this signal
+	   and we'll clear the package cache if we allow this */
+	if (client->priv->is_finishing && client->priv->synchronous) {
+		pk_client_error_set (error, PK_CLIENT_ERROR_FAILED,
+				     "unable to reset synchronous client in finished handler");
+		return FALSE;
+	}
+
 	if (client->priv->tid != NULL && !client->priv->is_finished) {
 		pk_debug ("not exit status, will try to cancel tid %s", client->priv->tid);
 		/* we try to cancel the running tranaction */
@@ -3861,6 +3885,7 @@ pk_client_init (PkClient *client)
 	client->priv->require_restart = PK_RESTART_ENUM_NONE;
 	client->priv->role = PK_ROLE_ENUM_UNKNOWN;
 	client->priv->is_finished = FALSE;
+	client->priv->is_finishing = FALSE;
 	client->priv->package_list = pk_package_list_new ();
 	client->priv->cached_package_id = NULL;
 	client->priv->cached_package_ids = NULL;
@@ -4042,6 +4067,7 @@ void init()
 #include <glib/gstdio.h>
 
 static gboolean finished = FALSE;
+static gboolean reset_okay = FALSE;
 static guint clone_packages = 0;
 
 static void
@@ -4053,6 +4079,18 @@ libst_client_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, LibS
 }
 
 static void
+libst_client_finished2_cb (PkClient *client, PkExitEnum exit, guint runtime, LibSelfTest *test)
+{
+	GError *error = NULL;
+	/* this is supported */
+	reset_okay = pk_client_reset (client, &error);
+	if (!reset_okay) {
+		pk_warning ("failed to reset in ::Finished(): %s", error->message);
+		g_error_free (error);
+	}
+}
+
+static void
 libst_client_copy_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, LibSelfTest *test)
 {
 	libst_loopquit (test);
@@ -4148,6 +4186,39 @@ libst_client (LibSelfTest *test)
 	}
 
 	/************************************************************/
+	libst_title (test, "get new client so we can test resets in ::Finished()");
+	client = pk_client_new ();
+	if (client != NULL) {
+		libst_success (test, NULL);
+	} else {
+		libst_failed (test, NULL);
+	}
+
+	/* check reset during finalise when sync */
+	pk_client_set_synchronous (client, TRUE, NULL);
+	g_signal_connect (client, "finished",
+			  G_CALLBACK (libst_client_finished2_cb), test);
+
+	/************************************************************/
+	libst_title (test, "search name sync, with a reset in finalise");
+	ret = pk_client_search_name (client, PK_FILTER_ENUM_NONE, "power", NULL);
+	if (ret) {
+		libst_success (test, NULL);
+	} else {
+		libst_failed (test, NULL);
+	}
+
+	/************************************************************/
+	libst_title (test, "check reset failed");
+	if (!reset_okay) {
+		libst_success (test, "failed to reset in finished as sync");
+	} else {
+		libst_failed (test, "reset in finished when sync");
+	}
+
+	g_object_unref (client);
+
+	/************************************************************/
 	libst_title (test, "get new client");
 	client = pk_client_new ();
 	if (client != NULL) {
commit ef5ab80370a46538f1dd10465593424b1cd343d6
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Aug 26 10:05:48 2008 +0100

    trivial: dont bt in pk_warning, it's not useful anymore

diff --git a/libpackagekit/pk-debug.c b/libpackagekit/pk-debug.c
index 57b86e9..27cf818 100644
--- a/libpackagekit/pk-debug.c
+++ b/libpackagekit/pk-debug.c
@@ -230,9 +230,6 @@ pk_warning_real (const gchar *func, const gchar *file, const int line, const gch
 	pk_print_line (func, file, line, buffer, CONSOLE_RED);
 
 	g_free(buffer);
-
-	/* we want to fix this! */
-	pk_debug_backtrace ();
 }
 
 /**
commit 2d95acdf0f07d21746115b43b93430b107579386
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Aug 26 08:53:39 2008 +0100

    bugfix: don't crash the daemon if we never used SetLocale, instead use the C locale in the backend. Fixes fd#17298

diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 39bc104..4833fa4 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -831,7 +831,14 @@ pk_transaction_set_running (PkTransaction *transaction)
 
 	/* assign */
 	pk_backend_set_current_tid (priv->backend, priv->tid);
-	pk_backend_set_locale (priv->backend, priv->locale);
+
+	/* if we didn't set a locale for this transaction, we would reuse the
+	 * last set locale in the backend, or NULL if it was not ever set.
+	 * in this case use the C locale */
+	if (priv->locale == NULL)
+		pk_backend_set_locale (priv->backend, "C");
+	else
+		pk_backend_set_locale (priv->backend, priv->locale);
 
 	/* set the role */
 	pk_backend_set_role (priv->backend, priv->role);


More information about the PackageKit-commit mailing list