[Yum-devel] FlexiTrigger

Menno Smits menno at freshfoo.com
Mon Jul 19 08:24:38 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

Find attached my initial attempt at a generic "do stuff based on current
program state and an XML configuration file" class :). I've called the
class FlexiTrigger but am open to better names ... (XTrigger?)

On instantation the class takes in the XML configuration file and the
name of a Python module containing functions for condition evaluation
and action application. These functions correspond to the content of
<type> elements in the <condition> and <action> elements in the
configuration file.

An example of basic functionality is shown at the bottom of
FlexiTrigger.py (uses triggers.xml and yumfuncs.py). Obviously the
pkgdata dictionary is nothing like the actual data structure that would
be used with yum. This doesn't really matter this structure is simply
passed around by FlexiTrigger and never actually examined. Only the
functions in yumfuncs.py need to understand the structure.

There's still plenty for me to tidy up (see all the TODO's). I'm just
releasing what I've got now to make sure I'm not missing anything
obvious. Feedback please?

Regards,
Menno

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA+4VFWH92Dls5JXwRAlIWAJ9dmfAJCvbxjhh+l8axwoLeTr3eagCg5m5f
KKdOAwiv4wlH2TNjJ3tzjqE=
=BrAS
-----END PGP SIGNATURE-----

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: FlexiTrigger.py
Url: http://lists.baseurl.org/pipermail/yum-devel/attachments/20040719/427354fe/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triggers.xml
Type: text/xml
Size: 493 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20040719/427354fe/attachment.bin 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: yumfuncs.py
Url: http://lists.baseurl.org/pipermail/yum-devel/attachments/20040719/427354fe/attachment-0001.diff 
-------------- next part --------------

Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.baseurl.org/pipermail/yum-devel/attachments/20040719/427354fe/attachment.htm 


More information about the Yum-devel mailing list