Tuesday, June 09, 2009

» osc plugin for the lazy

After my first osc plugin that does some output colouring, I've written another one for the lazy people like me. Mind you, osc is the command-line client for the openSUSE Build Service, and it is easy to extend through plugins. My typical workflow, when a build fails, is to do a osc cr to see the list of succeeded and failed builds and then, if applicable, do another osc bl to see the actual build output on a failed target, having to pass the distribution and architecture as parameters, e.g.:
osc bl openSUSE_Factory x86_64
Now, as said, I'm a lazy person, and I hate to do or type stuff a script could do for me. In the list of failed builds, I almost always go for the build log of the newest openSUSE version as it usually represents the most difficult target (more rpmlint tests, newest GCC, etc...), which is typically openSUSE_Factory. So why would I have to type all that, right ? ;) The following osc plugin provides a simple osc f ("f" for "fail" ;P) command that looks at the list of targets, keeps the failed ones and performs some very crude heuristics to pick the most interesting one, which is openSUSE_Factory or, if that one succeeded, the newest openSUSE version. The plugin is available as a .py file -- simply download it and install it into /var/lib/osc-plugins/, make it executable (chmod 755) and that's all. If people use and like it, I'll make an RPM. Promised.

Labels: , ,


Post a Comment

<< Home