[packagekit] packagekit: Branch 'master' - 8 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Fri Mar 7 06:46:53 PST 2008
backends/opkg/pk-backend-opkg.c | 6 +++
backends/yum2/helpers/yumDBUSBackend.py | 7 ++-
backends/zypp/pk-backend-zypp.cpp | 61 +++++++++++++++-----------------
backends/zypp/zypp-events.h | 17 ++++++--
backends/zypp/zypp-utils.cpp | 30 +++++++++++++++
backends/zypp/zypp-utils.h | 10 +++++
python/packagekit/daemonBackend.py | 59 ++++++++++++++++--------------
src/pk-backend-dbus.c | 5 --
8 files changed, 125 insertions(+), 70 deletions(-)
New commits:
commit 8f929b64dd16d1a8e6ff3dcba194e1464870620a
Author: Stefan Haas <shaas at suse.de>
Date: Fri Mar 7 13:50:11 2008 +0100
modified KeyRingReporter-Callback
diff --git a/backends/zypp/zypp-events.h b/backends/zypp/zypp-events.h
index ff2a46d..e4239b1 100644
--- a/backends/zypp/zypp-events.h
+++ b/backends/zypp/zypp-events.h
@@ -257,18 +257,20 @@ struct DownloadProgressReportReceiver : public zypp::callback::ReceiveReport<zyp
}
};
-struct KeyRingReceiver : public zypp::callback::ReceiveReport<zypp::KeyRingReport>, ZyppBackendReceiver
+struct KeyRingReportReceiver : public zypp::callback::ReceiveReport<zypp::KeyRingReport>, ZyppBackendReceiver
{
virtual bool askUserToAcceptUnsignedFile (const std::string &file)
{
- pk_debug("_______askUserToAcceptUnsignedFile_______");
- return true;
+ gboolean ok = zypp_signature_required(_backend, file);
+
+ return ok;
}
virtual bool askUserToAcceptUnknownKey (const std::string &file, const std::string &id)
{
- pk_debug("_______askUserToAcceptUnknownKey_______");
- return true;
+ gboolean ok = zypp_signature_required(_backend, file, id);
+
+ return ok;
}
virtual bool askUserToTrustKey (const zypp::PublicKey &key)
@@ -298,7 +300,7 @@ class EventDirector
ZyppBackend::RepoProgressReportReceiver _repoProgressReport;
ZyppBackend::InstallResolvableReportReceiver _installResolvableReport;
ZyppBackend::DownloadProgressReportReceiver _downloadProgressReport;
- ZyppBackend::KeyRingReceiver _keyRing;
+ ZyppBackend::KeyRingReportReceiver _keyRingReport;
public:
EventDirector (PkBackend *backend)
@@ -315,8 +317,8 @@ class EventDirector
_downloadProgressReport.initWithBackend (backend);
_downloadProgressReport.connect ();
- _keyRing.initWithBackend (backend);
- _keyRing.connect ();
+ _keyRingReport.initWithBackend (backend);
+ _keyRingReport.connect ();
}
~EventDirector ()
@@ -325,7 +327,7 @@ class EventDirector
_repoProgressReport.disconnect ();
_installResolvableReport.disconnect ();
_downloadProgressReport.disconnect ();
- _keyRing.disconnect ();
+ _keyRingReport.disconnect ();
}
};
diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp
index 5af84b3..94419ab 100644
--- a/backends/zypp/zypp-utils.cpp
+++ b/backends/zypp/zypp-utils.cpp
@@ -345,6 +345,36 @@ zypp_signature_required (PkBackend *backend, const zypp::PublicKey &key)
return ok;
}
+gboolean
+zypp_signature_required (PkBackend *backend, const std::string &file, const std::string &id)
+{
+ gboolean ok = pk_backend_repo_signature_required (backend,
+ "TODO: Repo-Name",
+ file.c_str (),
+ id.c_str (),
+ id.c_str (),
+ "UNKNOWN",
+ "UNKNOWN",
+ PK_SIGTYPE_ENUM_GPG);
+
+ return ok;
+}
+
+gboolean
+zypp_signature_required (PkBackend *backend, const std::string &file)
+{
+ gboolean ok = pk_backend_repo_signature_required (backend,
+ "TODO: Repo-Name",
+ file.c_str (),
+ "UNKNOWN",
+ "UNKNOWN",
+ "UNKNOWN",
+ "UNKNOWN",
+ PK_SIGTYPE_ENUM_GPG);
+
+ return ok;
+}
+
void
zypp_emit_packages_in_list (PkBackend *backend, std::vector<zypp::sat::Solvable> *v)
{
diff --git a/backends/zypp/zypp-utils.h b/backends/zypp/zypp-utils.h
index 02fa813..ee24d55 100644
--- a/backends/zypp/zypp-utils.h
+++ b/backends/zypp/zypp-utils.h
@@ -85,6 +85,16 @@ gchar * zypp_build_package_id_from_resolvable (zypp::sat::Solvable resolvable);
*/
gboolean zypp_signature_required (PkBackend *backend, const zypp::PublicKey &key);
+/**
+ * Ask the User if it is OK to refresh the Repo while we don't know the key
+ */
+gboolean zypp_signature_required (PkBackend *backend, const std::string &file);
+
+/**
+ * Ask the User if it is OK to refresh the Repo while we don't know the key, only its id which was never seen before
+ */
+gboolean zypp_signature_required (PkBackend *backend, const std::string &file, const std::string &id);
+
void zypp_emit_packages_in_list (PkBackend *backend, std::vector<zypp::sat::Solvable> *v);
#endif // _ZYPP_UTILS_H_
commit 71e61addb94b2474bb099ffc8de2b729aec4ffda
Author: Stefan Haas <shaas at suse.de>
Date: Fri Mar 7 13:15:00 2008 +0100
changed install-algorithm and connected KeyRing-Callback
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index 62e2bbe..c42a24d 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -120,7 +120,7 @@ static PkBackendThread *thread;
static void
backend_initialize (PkBackend *backend)
{
- //zypp::base::LogControl::instance ().logfile("/tmp/zypplog");
+ zypp::base::LogControl::instance ().logfile("/tmp/zypplog");
g_return_if_fail (backend != NULL);
pk_debug ("zypp_backend_initialize");
EventDirector *eventDirector = new EventDirector (backend);
@@ -599,42 +599,42 @@ backend_install_package_thread (PkBackendThread *thread, gpointer data)
try
{
-
zypp::ResPool pool = zypp_build_pool (TRUE);
pk_backend_set_percentage (backend, 10);
+ gboolean hit = false;
- // Iterate over the resolvables and mark the ones we want to install
- //zypp->start ();
+ // Iterate over the selectables and mark the one with the right name
+ zypp::ui::Selectable::Ptr selectable;
for (zypp::ResPoolProxy::const_iterator it = zypp->poolProxy().byKindBegin <zypp::Package>();
it != zypp->poolProxy().byKindEnd <zypp::Package>(); it++) {
- zypp::ui::Selectable::Ptr selectable = *it;
- if (strcmp (selectable->name().c_str(), pi->name) == 0) {
- switch (selectable->status ()) {
- case zypp::ui::S_Update: // Have installedObj
- case zypp::ui::S_NoInst: // No installedObj
- break;
- default:
- continue;
- break;
- }
+ if (strcmp ((*it)->name ().c_str (), pi->name) == 0) {
+ selectable = *it;
+ break;
+ }
+ }
- // This package matches the name we're looking for and
- // is available for update/install.
- zypp::ResObject::constPtr installable = selectable->candidateObj();
- const char *edition_str = installable->edition().asString().c_str();
+ // Choose the PoolItem with the right architecture and version
+ zypp::PoolItem item;
+ for (zypp::ui::Selectable::availablePoolItem_iterator it = selectable->availablePoolItemBegin ();
+ it != selectable->availablePoolItemEnd (); it++) {
+ if (strcmp ((*it)->edition ().asString ().c_str (), pi->version) == 0
+ && strcmp ((*it)->arch ().c_str (), pi->arch) == 0 ) {
+ hit = true;
+ it->status ().setToBeInstalled (zypp::ResStatus::USER);
+ item = *it;
+ }
+ }
- if (strcmp (edition_str, pi->version) == 0) {
-//printf ("WOOT! Marking the package to be installed!\n");
- // this is the one, mark it to be installed
- selectable->set_status (zypp::ui::S_Install);
- break; // Found it, get out of the for loop
- }
- }
- }
+ if (!hit) {
+ pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, "Couldn't find the package.");
+ g_free (package_id);
+ pk_package_id_free (pi);
+ pk_backend_finished (backend);
+ return FALSE;
+ }
pk_backend_set_percentage (backend, 40);
-//printf ("Resolving dependencies...\n");
// Gather up any dependencies
pk_backend_set_status (backend, PK_STATUS_ENUM_DEP_RESOLVE);
if (zypp->resolver ()->resolvePool () == FALSE) {
@@ -650,13 +650,14 @@ backend_install_package_thread (PkBackendThread *thread, gpointer data)
pk_backend_set_percentage (backend, 60);
-//printf ("Performing installation...\n");
// Perform the installation
// TODO: If this were an update, you should use PK_INFO_ENUM_UPDATING instead
zypp::ZYppCommitPolicy policy;
policy.restrictToMedia (0); // 0 - install all packages regardless to media
zypp::ZYppCommitResult result = zypp->commit (policy);
-printf ("Finished the installation.\n");
+
+ // Reset the Status of this Item
+ item.statusReset ();
pk_backend_set_percentage (backend, 100);
@@ -669,7 +670,6 @@ printf ("Finished the installation.\n");
pk_backend_finished (backend);
return FALSE;
} catch (const zypp::Exception &ex) {
- //pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, "Error enumerating repositories");
pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asUserString().c_str() );
g_free (package_id);
pk_package_id_free (pi);
@@ -694,7 +694,6 @@ backend_install_package (PkBackend *backend, const gchar *package_id)
// For now, don't let the user cancel the install once it's started
pk_backend_set_allow_cancel (backend, FALSE);
- //printf("package_id is %s\n", package_id);
gchar *package_to_install = g_strdup (package_id);
pk_backend_thread_create (thread, backend_install_package_thread, package_to_install);
}
diff --git a/backends/zypp/zypp-events.h b/backends/zypp/zypp-events.h
index 1af803c..ff2a46d 100644
--- a/backends/zypp/zypp-events.h
+++ b/backends/zypp/zypp-events.h
@@ -298,6 +298,7 @@ class EventDirector
ZyppBackend::RepoProgressReportReceiver _repoProgressReport;
ZyppBackend::InstallResolvableReportReceiver _installResolvableReport;
ZyppBackend::DownloadProgressReportReceiver _downloadProgressReport;
+ ZyppBackend::KeyRingReceiver _keyRing;
public:
EventDirector (PkBackend *backend)
@@ -313,6 +314,9 @@ class EventDirector
_downloadProgressReport.initWithBackend (backend);
_downloadProgressReport.connect ();
+
+ _keyRing.initWithBackend (backend);
+ _keyRing.connect ();
}
~EventDirector ()
@@ -321,6 +325,7 @@ class EventDirector
_repoProgressReport.disconnect ();
_installResolvableReport.disconnect ();
_downloadProgressReport.disconnect ();
+ _keyRing.disconnect ();
}
};
commit 4c2bcc1d56602e257c312b0398a0d119efe38b6a
Merge: e19b8fb... 067c678...
Author: Robin Norwood <rnorwood at redhat.com>
Date: Thu Mar 6 19:26:39 2008 -0500
Merge branch 'master' of git+ssh://rnorwood@git.packagekit.org/srv/git/PackageKit
commit e19b8fb40400e0504f8bb803872610c11a3c5442
Author: Robin Norwood <rnorwood at redhat.com>
Date: Thu Mar 6 19:26:06 2008 -0500
Fix package removal and zombie process issues.
diff --git a/backends/yum2/helpers/yumDBUSBackend.py b/backends/yum2/helpers/yumDBUSBackend.py
index 950b79f..b2a15fd 100755
--- a/backends/yum2/helpers/yumDBUSBackend.py
+++ b/backends/yum2/helpers/yumDBUSBackend.py
@@ -687,6 +687,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
txmbr = self.yumbase.install(name=pkg.name)
successful = self._runYumTransaction()
if not successful:
+ # _runYumTransaction unlocked yum, set the error code, and called Finished.
return
except yum.Errors.InstallError,e:
msgs = '\n'.join(e)
@@ -764,7 +765,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
self._unlock_yum()
self.Finished(EXIT_SUCCESS)
- def doRemovePackage(self, package, allowdep):
+ def doRemovePackage(self, package, allowdep, autoremove):
'''
Implement the {backend}-remove functionality
'''
@@ -1449,7 +1450,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
self._unlock_yum()
self.ErrorCode(ERROR_DEP_RESOLUTION_FAILED,retmsg)
self.Finished(EXIT_FAILED)
- return
+ return False
else:
self._check_for_reboot()
if removedeps == False:
@@ -1591,7 +1592,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
if hasattr(self,'yumbase'):
pass
else:
- self.Init()
+ self.doInit()
if lazy_cache:
for repo in self.yumbase.repos.listEnabled():
repo.metadata_expire = 60 * 60 * 24 # 24 hours
diff --git a/python/packagekit/daemonBackend.py b/python/packagekit/daemonBackend.py
index 4c53a7e..261de3b 100644
--- a/python/packagekit/daemonBackend.py
+++ b/python/packagekit/daemonBackend.py
@@ -79,8 +79,6 @@ class PackageKitBaseBackend(dbus.service.Object):
def __init__(self, bus_name, dbus_path):
dbus.service.Object.__init__(self, bus_name, dbus_path)
- signal.signal(signal.SIGCHLD, signal.SIG_IGN) # avoid child zombie processes
-
self._allow_cancel = False
self._child_pid = None
self._is_child = False
@@ -118,10 +116,15 @@ class PackageKitBaseBackend(dbus.service.Object):
self._child_pid = os.fork()
if self._child_pid:
+ # Setting up this watch causes gobject to nicely clean up zombie processes
+ gobject.child_watch_add(self._child_pid, self.on_child_exit)
self._is_child = False
else:
self._is_child = True
+ def on_child_exit(pid, condition, data):
+ pass
+
def _child_is_running(self):
pklog.debug("in child_is_running")
if self._child_pid:
@@ -136,7 +139,7 @@ class PackageKitBaseBackend(dbus.service.Object):
running = False
if not running:
- pklog.debug("child %s is stopped" % pid)
+ pklog.debug("child %s is stopped" % self._child_pid)
self._child_pid = None
return False
@@ -498,8 +501,8 @@ class PackageKitBaseBackend(dbus.service.Object):
self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
- in_signature='sb', out_signature='')
- def RemovePackage(self, package, allowdep):
+ in_signature='sbb', out_signature='')
+ def RemovePackage(self, package, allowdep, autoremove):
'''
Implement the {backend}-remove functionality
'''
@@ -507,7 +510,7 @@ class PackageKitBaseBackend(dbus.service.Object):
self.forkme()
if self._child_pid:
return
- self.doRemovePackage( package, allowdep)
+ self.doRemovePackage(package, allowdep, autoremove)
self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
commit 067c67899625b9b68855e3f10f09b97930883bfa
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Mar 6 23:29:38 2008 +0000
enable the backend-dbus self checks, now we can do reliable forking
diff --git a/src/pk-backend-dbus.c b/src/pk-backend-dbus.c
index 5aa55c5..e132f50 100644
--- a/src/pk-backend-dbus.c
+++ b/src/pk-backend-dbus.c
@@ -1274,6 +1274,7 @@ pk_backend_dbus_test_package_cb (PkBackend *backend, PkInfoEnum info,
const gchar *package_id, const gchar *summary,
PkBackendDbus *backend_dbus)
{
+ pk_debug ("package");
number_packages++;
}
@@ -1308,9 +1309,6 @@ libst_backend_dbus (LibSelfTest *test)
pk_backend_set_name (backend_dbus->priv->backend, "test_dbus");
pk_backend_lock (backend_dbus->priv->backend);
- /* wimp out until fork works */
- goto chicken_out;
-
/************************************************************/
libst_title (test, "set the name and activate");
ret = pk_backend_dbus_set_name (backend_dbus, "org.freedesktop.PackageKitTestBackend");
@@ -1359,7 +1357,6 @@ libst_backend_dbus (LibSelfTest *test)
libst_failed (test, "wrong number of packages %i", number_packages);
}
-chicken_out:
g_object_unref (backend_dbus);
libst_end (test);
commit cdc3055cfb31554a8feb39c3eadf68994a73b3bc
Merge: d04e575... dd1fa48...
Author: Robin Norwood <rnorwood at redhat.com>
Date: Thu Mar 6 14:02:13 2008 -0500
Merge branch 'master' of git+ssh://rnorwood@git.packagekit.org/srv/git/PackageKit
commit dd1fa4811b48705acb8b9eb98910fe5632f3d8d2
Author: Thomas Wood <thomas at openedhand.com>
Date: Thu Mar 6 17:49:12 2008 +0000
opkg: protect search thread from NULL searches
diff --git a/backends/opkg/pk-backend-opkg.c b/backends/opkg/pk-backend-opkg.c
index 996bba1..ba05c3a 100644
--- a/backends/opkg/pk-backend-opkg.c
+++ b/backends/opkg/pk-backend-opkg.c
@@ -495,6 +495,12 @@ backend_search_thread (PkBackendThread *thread, SearchParams *params)
gint filter;
PkBackend *backend;
+ if (!params->needle)
+ {
+ g_free (params);
+ return FALSE;
+ }
+
/* get current backend */
backend = pk_backend_thread_get_backend (thread);
commit d04e57554c144d4809281dec68e744045cd2393a
Author: Robin Norwood <rnorwood at redhat.com>
Date: Thu Mar 6 12:17:52 2008 -0500
Prevent zombie processes.
diff --git a/python/packagekit/daemonBackend.py b/python/packagekit/daemonBackend.py
index cf9293d..4c53a7e 100644
--- a/python/packagekit/daemonBackend.py
+++ b/python/packagekit/daemonBackend.py
@@ -79,6 +79,8 @@ class PackageKitBaseBackend(dbus.service.Object):
def __init__(self, bus_name, dbus_path):
dbus.service.Object.__init__(self, bus_name, dbus_path)
+ signal.signal(signal.SIGCHLD, signal.SIG_IGN) # avoid child zombie processes
+
self._allow_cancel = False
self._child_pid = None
self._is_child = False
@@ -316,7 +318,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doSearchName(filters, search)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='', out_signature='')
@@ -345,7 +347,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doSearchDetails(filters,key)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='ss', out_signature='')
@@ -358,7 +360,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doSearchGroup(filters,key)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='ss', out_signature='')
@@ -371,7 +373,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doSearchFile(filters,key)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='sb', out_signature='')
@@ -384,7 +386,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doGetRequires(package,recursive)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='sb', out_signature='')
@@ -397,7 +399,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doGetDepends(package,recursive)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='', out_signature='')
@@ -410,7 +412,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doUpdateSystem()
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='b', out_signature='')
@@ -423,7 +425,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doRefreshCache( force)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='ss', out_signature='')
@@ -436,7 +438,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doResolve( filters, name)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='s', out_signature='')
@@ -449,8 +451,8 @@ class PackageKitBaseBackend(dbus.service.Object):
self.forkme()
if self._child_pid:
return
- self.doInstallPackage( package)
- sys.exit(0)
+ self.doInstallPackage(package)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='s', out_signature='')
@@ -465,7 +467,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doInstallFile( inst_file)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='s', out_signature='')
@@ -480,7 +482,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doServicePack( location)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='s', out_signature='')
@@ -493,7 +495,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doUpdatePackage( package)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='sb', out_signature='')
@@ -506,7 +508,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doRemovePackage( package, allowdep)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='s', out_signature='')
@@ -519,7 +521,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doGetDescription( package)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='s', out_signature='')
@@ -532,7 +534,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doGetFiles( package)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='s', out_signature='')
@@ -545,7 +547,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doGetUpdates(filters)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='sb', out_signature='')
@@ -558,7 +560,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doRepoEnable( repoid, enable)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='', out_signature='')
@@ -571,7 +573,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doGetRepoList()
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='s', out_signature='')
@@ -584,7 +586,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doGetUpdateDetail(package)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='sss', out_signature='')
@@ -597,7 +599,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doRepoSetData( repoid, parameter, value)
- sys.exit(0)
+ self.loop.quit()
@dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
in_signature='s', out_signature='')
@@ -610,7 +612,7 @@ class PackageKitBaseBackend(dbus.service.Object):
if self._child_pid:
return
self.doInstallPublicKey(keyurl)
- sys.exit(0)
+ self.loop.quit()
#
# Utility methods
More information about the PackageKit
mailing list