[Yum-devel] yum-cron and handling errors and warnings

James Antill james at fedoraproject.org
Fri Jul 29 16:21:38 UTC 2011

On Fri, 2011-07-29 at 10:16 -0400, Matthew Miller wrote:
> In bulinux-autoupdate, which is approaching a decade in age, we check for
> errors and warnings from yum update transactions by saving standard error
> and standard output to files. And then, if there is output on stderr,
> awesomely, we do stuff like `egrep -iq '(error|not signed)'` to decide
> whether it's errors or warnings.
> This is used to generate a helpful subject line and (perhaps more
> importantly) to generate meaningful log messages.
> This all actually works very well, but makes me wince. Is there a better way
> in these modern times?

 The only good ways I can think of:

1. Write your own version of yummain.py for yum-cron, which DTRT with
the errors.

2. Use yum, and rely on "yum history" and/or "yum version nogroups" to
see what happened.

...#1 is the "better" way, but likely more work.

More information about the Yum-devel mailing list