开发者

how to uninstall an rpm during the installation of new one

for an r开发者_Python百科pm based system, I need to change a package with another package while installing the new one. fg, installation of package2.rpm shall uninstall package1.rpm and continue its installation slightly. for this, I'm planning to erase package1 while installing package2 and call rpm -e at %pre section of package2.rpm. But I can not be sure if rpm locks the rpm database just after it works or just before installation progress start. Sadly, since this is a concept problem for now, I do not have any linux system to try it out quickly. Is it possible to use rpm -e at %pre section? or are there any way to do this with a single rpm package, because I would have to distribute the package as an rpm package.


The correct way to handle this would be to include

Obsoletes: package1

in your package2 spec. When it is installed through yum package1 will be uninstalled automatically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜