[Yum] Qs regarding Yum plugin

Creative Innovative innovative_c at yahoo.com
Mon Feb 9 19:27:07 UTC 2009


Hi All,
 
I have been using Yum for last 6 months, for basic stuff, like installing/upgrading 
packages.Now I am in the process of writing a Yum plugin, so still trying to get a handle on it.
 
For what I need to do, in def posttrans_hook, 
1) take the transaction object, and look at the list of packages that were installed/upgraded/removed.
2) Check to see if each package install/package upgrade meets security criteria.
NOTE::I HAVE TO INSTALL/UPGRADE PACKAGES, BEFORE RUNNING SECURITY CRITERIA.SO THATS WHY THIS CHECK COMES IN POSTTRANS_HOOK.
3) If any of the package does NOT meet that criteria, I need to undo the package install/package upgrade.
 
 
So I am trying to figure out, how can I do this in posttrans_hook. 
 
For example, lets say under posttrans_hook,
I loop through the transaction object and determine below
1. Pkg A installed
2. Pkg B upgraded.
 
Now I run my security criteria, for files installed, and lets say Pkg A fails that criteria.
 
Qs 1) -->Now can I create a NEW TRANSACTION, like below
1. Pkg A remove
 
Qs 2) And then can I run this NEW TRANSACTION  from posttrans_hook.
 
Qs 3) If this wont work, is there any other way, where I can run package removal, from posttrans_hook.
 
Please let me know.
 
Thanks in advance,
 
SK.
 
 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum/attachments/20090209/f132d479/attachment.htm>


More information about the Yum mailing list