[yum-git] plugins/refresh-updatesd
Tim Lauridsen
timlau at linux.duke.edu
Fri May 30 13:11:30 UTC 2008
plugins/refresh-updatesd/refresh-updatesd.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 8e3e286a141ce15c7936cc38d5fc00d7e5515924
Author: Tim Lauridsen <tla at rasmil.dk>
Date: Fri May 30 15:01:18 2008 +0200
revert previous commit and add another solution
diff --git a/plugins/refresh-updatesd/refresh-updatesd.py b/plugins/refresh-updatesd/refresh-updatesd.py
index 8ae5599..d4ffb70 100644
--- a/plugins/refresh-updatesd/refresh-updatesd.py
+++ b/plugins/refresh-updatesd/refresh-updatesd.py
@@ -27,6 +27,7 @@ def posttrans_hook(conduit):
"""
if os.geteuid(): # If we aren't root, we _can't_ have updated anything
return
+
try:
bus = dbus.SystemBus()
except dbus.DBusException, e:
@@ -34,10 +35,19 @@ def posttrans_hook(conduit):
conduit.info(6, "%s" %(e,))
return
try:
+ o = bus.get_object('org.freedesktop.DBus', '/')
+ o = dbus.Interface(o, "org.freedesktop.DBus")
+ if not o.NameHasOwner("edu.duke.linux.yum"):
+ conduit.info(2, "yum-updatesd not on the bus")
+ return
+ except dbus.DBusException, e:
+ conduit.info(2, "Unable to look at what's on dbus")
+ conduit.info(6, "%s" %(e,))
+ return
+ try:
updatesd_proxy = bus.get_object('edu.duke.linux.yum', '/Updatesd')
updatesd_iface = dbus.Interface(updatesd_proxy, 'edu.duke.linux.yum')
updatesd_iface.CheckNow()
- except Exception, e:
+ except dbus.DBusException, e:
conduit.info(2, "Unable to send message to yum-updatesd")
conduit.info(6, "%s" %(e,))
-
More information about the Yum-cvs-commits
mailing list