[yum-cvs] yum-utils/plugins/refresh-updatesd README, NONE, 1.1 refresh-updatesd.conf, NONE, 1.1 refresh-updatesd.py, NONE, 1.1
James Bowes
jbowes at linux.duke.edu
Wed Feb 14 01:44:24 UTC 2007
Update of /home/groups/yum/cvs/yum-utils/plugins/refresh-updatesd
In directory login1.linux.duke.edu:/tmp/cvs-serv2994/plugins/refresh-updatesd
Added Files:
README refresh-updatesd.conf refresh-updatesd.py
Log Message:
Add refresh-updatesd plugin
--- NEW FILE README ---
This is refresh-updatesd, a plugin for Yum.
refresh-updatesd tells yum-updatesd to check for updates when yum exits.
This way, if you run 'yum list updates' and yum says there's a new version
of zsh available, puplet will almost instantly update itself to reflect this.
The plugin is very dumb, It should probably only send the message in
certain cases.
--- NEW FILE refresh-updatesd.conf ---
[main]
enabled=1
--- NEW FILE refresh-updatesd.py ---
# A plugin for yum which notifies yum-updatesd to refresh it's data
#
# Written by James Bowes <jbowes at redhat.com>
#
# 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.
#
# version 0.0.3
import dbus
from yum.plugins import TYPE_CORE
requires_api_version = '2.5'
plugin_type = TYPE_CORE
repos_setup = False
def postreposetup_hook(conduit):
global repos_setup
repos_setup = True
def close_hook(conduit):
if not repos_setup:
return
try:
bus = dbus.SystemBus()
except dbus.DBusException:
conduit.error(2, "Unable to connect to dbus")
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 dbus.DBusException:
conduit.error(2, "Unable to send message to yum-updatesd")
More information about the Yum-cvs-commits
mailing list