[PackageKit-commit] packagekit: Branch 'master' - 7 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Wed Apr 23 07:34:49 PDT 2008
backends/alpm/pk-backend-alpm.c | 2 +-
backends/test/helpers/PackageKitDbusTest.py | 8 ++++----
python/packagekit/daemonBackend.py | 14 ++++++++++----
src/pk-backend-dbus.c | 5 +++--
src/pk-backend.c | 9 +--------
5 files changed, 19 insertions(+), 19 deletions(-)
New commits:
commit b7a5b993470c8bcdf0aa94d96acc45d46a660d26
Merge: e2dfc3d... 458b439...
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Apr 23 15:32:05 2008 +0100
Merge branch 'master' of git+ssh://hughsie@git.packagekit.org/srv/git/PackageKit
commit e2dfc3d69c8fd121d168bec44b9b384c7852991c
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Apr 23 15:30:40 2008 +0100
only do the self.loop.quit when after gobject.idle_add so DBUS gets a chance to respond
diff --git a/python/packagekit/daemonBackend.py b/python/packagekit/daemonBackend.py
index 9f89e7d..04277c0 100644
--- a/python/packagekit/daemonBackend.py
+++ b/python/packagekit/daemonBackend.py
@@ -356,12 +356,18 @@ class PackageKitBaseBackend(dbus.service.Object):
"This function is not implemented in this backend")
self.Finished(EXIT_FAILED)
+ # We have to idle add this from self.Exit() so that DBUS gets a chance to reply
+ def _doExitDelay(self):
+ pklog.info("ExitDelay()")
+ self.loop.quit()
+ sys.exit(1)
+
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='', out_signature='')
def Exit(self):
pklog.info("Exit()")
+ gobject.idle_add (self._doExitDelay)
self.doExit()
- self.loop.quit()
def doExit(self):
'''
commit 93e3a82b47e6a5280673c5c9647860e8233faa99
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Apr 23 15:29:57 2008 +0100
make the test DBUS backend run (changed constant name) and don't sys.exit, let the superclass handle it
diff --git a/backends/test/helpers/PackageKitDbusTest.py b/backends/test/helpers/PackageKitDbusTest.py
index 66c7df2..54844a4 100755
--- a/backends/test/helpers/PackageKitDbusTest.py
+++ b/backends/test/helpers/PackageKitDbusTest.py
@@ -61,12 +61,12 @@ class PackageKitTestBackendService(PackageKitBaseBackend):
@threaded
def doInit(self):
- pklog.info( 'Init!')
+ pklog.info('Init!')
time.sleep(0.1)
def doExit(self):
- pklog.info('Exit!')
- sys.exit(0)
+ pklog.info('Exit requested!')
+ time.sleep(0.1)
@threaded
def doCancel(self):
@@ -87,7 +87,7 @@ class PackageKitTestBackendService(PackageKitBaseBackend):
if self._canceled.isSet():
self.ErrorCode(ERROR_TRANSACTION_CANCELLED,
"Search was canceled")
- self.Finished(EXIT_KILL)
+ self.Finished(EXIT_KILLED)
self._canceled.clear()
return
time.sleep(1)
commit 458b43906abd2fe946c2db2f95622bd5e653ec36
Author: Valeriy Lyasotskiy <onestep at ukr.net>
Date: Wed Apr 23 17:28:47 2008 +0300
updated backend_install_file()
diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c
index b5250f7..c4f9f27 100644
--- a/backends/alpm/pk-backend-alpm.c
+++ b/backends/alpm/pk-backend-alpm.c
@@ -911,7 +911,7 @@ backend_get_filters (PkBackend *backend)
}
static void
-backend_install_file (PkBackend *backend, const gchar *path)
+backend_install_file (PkBackend *backend, gboolean trusted, const gchar *path)
{
g_return_if_fail (backend != NULL);
commit eeb2476cbc5a3f65b8f3fae3111cd19d5cb9815f
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Apr 23 15:26:12 2008 +0100
fix make check by not doubling up on some titles in PkbackendDbus
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 4e2550a..8500024 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -1836,13 +1836,13 @@ libst_backend (LibSelfTest *test)
}
/************************************************************/
- libst_title (test, "check we enforce finished after error_code");
pk_backend_error_code (backend, PK_ERROR_ENUM_GPG_FAILURE, "test error");
/* wait for finished */
libst_loopwait (test, PK_BACKEND_FINISHED_ERROR_TIMEOUT + 200);
libst_loopcheck (test);
+ libst_title (test, "check we enforce finished after error_code");
if (number_messages == 1) {
libst_success (test, NULL);
} else {
@@ -1854,7 +1854,6 @@ libst_backend (LibSelfTest *test)
number_messages = 0;
/************************************************************/
- libst_title (test, "check we enforce finished after two error_codes");
pk_backend_error_code (backend, PK_ERROR_ENUM_GPG_FAILURE, "test error1");
pk_backend_error_code (backend, PK_ERROR_ENUM_GPG_FAILURE, "test error2");
commit 22f3674084d42b410f3837c5d66b7978b020552b
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Apr 23 14:54:03 2008 +0100
fix two issues with the dbus backend
diff --git a/python/packagekit/daemonBackend.py b/python/packagekit/daemonBackend.py
index c576178..9f89e7d 100644
--- a/python/packagekit/daemonBackend.py
+++ b/python/packagekit/daemonBackend.py
@@ -595,14 +595,14 @@ class PackageKitBaseBackend(dbus.service.Object):
self.Finished(EXIT_FAILED)
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
- in_signature='s', out_signature='')
+ in_signature='bs', out_signature='')
def InstallFile (self, trusted, inst_file):
'''
Implement the {backend}-install_file functionality
Install the package containing the inst_file file
'''
- pklog.info("InstallFile(%s)" % inst_file)
- self.doInstallFile(inst_file)
+ pklog.info("InstallFile(%i,%s)" % (trusted,inst_file))
+ self.doInstallFile(trusted,inst_file)
def doInstallFile(self, inst_file):
'''
diff --git a/src/pk-backend-dbus.c b/src/pk-backend-dbus.c
index 2fb1e6a..ce41d83 100644
--- a/src/pk-backend-dbus.c
+++ b/src/pk-backend-dbus.c
@@ -1383,9 +1383,10 @@ pk_backend_dbus_init (PkBackendDbus *backend_dbus)
G_TYPE_STRING, G_TYPE_INVALID);
/* Repo Signature Required */
- dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_UINT,
+ dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_STRING_UINT,
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INVALID);
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_UINT, G_TYPE_INVALID);
/* EulaRequired */
dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING,
commit a7791b51901ec424f3676d2c111641433f9a3e2b
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Apr 23 14:07:50 2008 +0100
we don't emit messages for duplicate errors anymore, so fix make check
diff --git a/src/pk-backend.c b/src/pk-backend.c
index c4bc81d..4e2550a 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -1862,12 +1862,6 @@ libst_backend (LibSelfTest *test)
libst_loopwait (test, PK_BACKEND_FINISHED_ERROR_TIMEOUT + 100);
libst_loopcheck (test);
- if (number_messages == 1) {
- libst_success (test, NULL);
- } else {
- libst_failed (test, "we messaged %i times!", number_messages);
- }
-
g_object_unref (backend);
libst_end (test);
More information about the PackageKit-commit
mailing list