当yum降级在已安装的软件包上运行时,yum是否首先删除软件包,然后重新安装以前的软件包? 作为推论,在yum降级,0或1上传递给包的%preun scriptlet的参数是什么?
答案 0 :(得分:1)
好问题。从yum 3.2.22源码(从我的CentOS 5机器)快速浏览,看起来它是一个删除+安装的单个事务。这会让我觉得%preun
会传递1
。
yum.YumBase.downgrade的内置帮助也有这样的说法:
$ python
Python 2.4.3 (#1, Jan 9 2013, 06:47:03)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
>>> help(yum.YumBase.downgrade)
Help on method downgrade in module yum:
downgrade(self, po=None, **kwargs) unbound yum.YumBase method
Try to downgrade a package. Works like:
% yum shell <<EOL
remove abcd
install abcd-<old-version>
run
EOL