Qs regarding Yum plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
 
 

_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux