如何在不修改现有 rpm 的规范文件的情况下使现有的 rpm 过时新的 rpm [英] How to make an existing rpm obsolete a new rpm without modify the existing rpm's spec file

查看:66
本文介绍了如何在不修改现有 rpm 的规范文件的情况下使现有的 rpm 过时新的 rpm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队将向用户区域添加一个新的 RPM,Y.有一个 RPM,X,它必须与 Y 互斥.换句话说,X 和 Y 不能共存.

My team is going to add a new RPM, Y, to the user land. There has been an RPM, X, which has to be mutually exclusive with Y. In other words, X and Y must not coexist.

因此,在 Y 的规范文件中,有一行写着Obsolete: X".

Thus, in the spec file of Y, there is a line saying "Obsolete: X."

问题是我们不能修改 X 的 spec 文件.在编写它时,没有名为 Y 的包.因此,它既不是Obsoletes"也不是Conflicts"Y.

The thing is that we cannot modify the spec file of X. When it was written, there was no such package named Y. Thus, it neither "Obsoletes" nor "Conflicts" Y.

我们可能会向用户领域添加更多的假/虚拟/元软件包.无论如何,现有的包 X 是否也有效地淘汰了新的包 Y?

We may add more fake/virtual/meta packages to the user land. Is there anyway that the existing package X also effectively obsoletes the new package Y?

yum install X

如果安装了 Y,则必须删除它.

must remove Y if it is installed.

推荐答案

请参阅 Fedora 废弃软件包指南:https://fedoraproject.org/wiki/Packaging:Guidelines#Renaming.2FReplacing_Existing_Packages 它提供了全面的描述.

See the Fedora Guidelines for obsoleting packages: https://fedoraproject.org/wiki/Packaging:Guidelines#Renaming.2FReplacing_Existing_Packages It provides a comprehensive description.

但根据您的描述,您不想使用过时".当您用另一个包替换一个包时使用.例如,当项目更改名称并因此包更改名称并且您想将 old-name-2.0 替换为 new-name-3.0 甚至 新名称-1.0.

But according your description you do not want to use 'obsoletes'. This is used when you replace one package with another one. E.g., when the project change the name and therefore the package change the name and you want to replace old-name-2.0 with new-name-3.0 or even new-name-1.0.

您想使用 Conflicts 并且将这个标签放入其中一个包中就足够了.当 Y 规范将具有:

You want to use Conflicts and it is enough to put this tag into one of this packages. When Y spec will have:

Conflicts: X

那么你就不需要改变X,也不能同时安装X和Y.

then you do not need to alter X and you cannot install X and Y at the same time.

这篇关于如何在不修改现有 rpm 的规范文件的情况下使现有的 rpm 过时新的 rpm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆