[Yum-devel] patch to propagate initialization errors to the emitters in the updates-daemon

Ray Strode halfline at gmail.com
Wed Feb 28 21:41:32 UTC 2007


Hi,

I'm working on a project that has a yum plugin that does some things
that can conceivably fail as part of its init_hook .  I'd like for the
plugin to be able to propagate error messages from init_hook failures
up to pup, so that pup can display the error messages to the user.

One complication is that the user may be using a locale that is
different than the locale that yum-updatesd is running with.  This
means that we need to pass the translation domain "e.g.,
'yum-updatesd' or 'messages' or 'mypluginname'" along with the error
message so that pup can look up the appropriate translation for the
language the user is logged in as.

Another complication is that the user may not be logged in when the
error happens.  I'm not sure of a good solution to this problem (short
of queuing the messages which could get pretty complicated), so it's
one I'm sort of punting on.  Note the user will probably eventually
see the message because yum-updatesd will try the same operation again
after the update interval times out and fail again.  Also, if pup
calls the CheckNow() api on startup then the user will get the message
when they first login, so I don't think its a huge deal.

It might be interesting to pass the translation domain as part of the
other signals that yum-updatesd emits, but that will break API.  I
don't know that's okay.

Thoughts?
--Ray
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-3.0.1-propagate-messages.patch
Type: application/octet-stream
Size: 4370 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070228/3a5afca6/attachment.obj 


More information about the Yum-devel mailing list