我为yum编写了一个插件,用于在降级期间删除特定的rpm。但我想在yum更新其他rpm之前删除rpm。(希望使用yum plugins来限制顺序,而不是在spec文件中这样做)
在yum plugins的yum降级/升级/安装过程中,是否可以限制update/install/remove/clear/erase的顺序??在
yum插件内容:
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')
注意:我想限制高亮显示部分的顺序。首先删除,然后降级其他RPM。但与erase/remove相比,yum在内部先更新/安装。在
目前没有回答
相关问题 更多 >
编程相关推荐