[Yum-devel] new plugin slots
Tim Lauridsen
tim at rasmil.dk
Thu Dec 7 09:03:31 UTC 2006
seth vidal wrote:
> A thought as I was trying to figure out how to add some external
> debugging into yum.
>
> Would it be useful or reasonable to add in pre and post transaction
> element plugin slots. So that between each element in the transaction
> callback we could do something or note it. I was mostly thinking of it
> for journaling the transaction outside of the db but I can think of some
> useful debugging that could go on when things go ass-sideways due to a
> broken scriptlet or other error that doesn't cause the transaction to
> abort but would be interesting to get info out of.
>
I think i could be useful to have some kind of pre/post transaction
element plugin slot.
> the problems with this is that the rpm transaction callback in yum
> lives in the cli-space and therefore makes a poor fit for a yum-library
> level plugin. Any thoughts/suggestions on this?
>
>
In yumex i have split the rpm callback into 2 classes,
one base class there contains the basic stuff and it turns the big if
statement into
calls to class methods, so that different rpm callback actions can be
overloaded by a child class.
one child class there inherit from the base class and add the yumex
specific actions like incrementing the progress bars etc.
Check the attached file for the 2 classes.
This base class could be implemented into yum base and plugin slots
could be added.
A rpm transaction currently in yum cli, could be changed into a child
class, with the output & progress stuff, the yum cli needs.
Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yumex-rpm-callbacks.py
Type: text/x-python
Size: 12764 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20061207/791cb86a/attachment.py
More information about the Yum-devel
mailing list