Yum plguin help
Jalandhar Singh
jsingh at sandvine.com
Fri Apr 17 10:25:45 UTC 2015
Hi,
I have written a plugin for yum to remove the specific rpm during downgrade. But I want to remove the rpm before yum will update the other rpms. (want to restrict the order using yum plugins, instead of doing in the spec file)
Can we restrict the order of the update/install/remove/clear/erase during the yum downgrade/upgrade/install procedure in the yum plugins ??
Content of yum plugin:
def postresolve_hook(conduit):
tsInfo = conduit.getTsInfo()
rpmdb = conduit.getRpmDB()
oldlen = 0
while oldlen != len(tsInfo):
oldlen = len(tsInfo)
opts , commands = conduit.getCmdLine()
conduit.info(2, commands[0])
# If the command line input is 'update'/'upgrade'/'install' and 'sde rpm state is UPDATE' then remove these five rpms.
if ( commands[0] == 'downgrade' ) and ( commands[1] == 'sde' ):
for txmbr in tsInfo.getMembersWithState(output_states=[TS_INSTALL]):
if txmbr.name == 'sde' and txmbr.version < '7.30':
conduit._base.remove(name='tclkit', arch='x86_64')
conduit._base.downgrade(name='svpermissions', arch='x86_64')
conduit._base.downgrade(name='svsde', arch='x86_64')
Note: I want to restrict the order of the highlighted part. Frist remove then downgrade other rpms. But yum internally do update/install first as compare to erase/remove.
Thanks
-Jalandhar Singh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20150417/e67880ea/attachment.html>
More information about the Yum-devel
mailing list