RPM+Yum:同时安装两个同名不同版本的包
对于版主:这个问题是关于基于 RPM 的安装程序的开发。
我正在为我们的软件开发打包系统。我们设计了更新管理,以便当我们想要移动到新的主要版本时,我们更改 RPM 软件包以将所有文件安装到另一个目录(带有另一个后缀)并更改软件包版本。我们为包保留相同的名称(例如:a-package-1.0.0 --> a-package-2.0.0)。我们希望安装新软件包并保留旧软件包,以便用户在迁移到新版本时能够继续使用旧版本。
因此,我们的软件包和 RPM 实用程序之间不存在文件冲突,同时安装它们不会出现任何问题(rpm -ivh ...)。但 Yum 认为新版本是旧版本的更新。
有没有办法生成这样的 RPM 软件包,以使“yum install a-package-1.0.0 a-package-2.0.0”同时安装它们?也许必须设置包中的某些标志?我什么也没找到。
For moderators: this question is about development of RPM based installer.
I'm developing packaging system for our software. We've designed our update management so that when we want to move to the new major version, we change RPM package to install all files into another directory (with another suffix) and change the package version. We keep the same name for the package (like: a-package-1.0.0 --> a-package-2.0.0). We want to install the new package keeping the old one to make user able to continue work with the old version while he moving to the new one.
So there is no file conflicts between our packages and RPM utility install them simultaneously without any issues (rpm -ivh ...). But Yum thinks that the new version is an update for the old one.
Is there a way to produce such RPM packages to make 'yum install a-package-1.0.0 a-package-2.0.0' installing them both? Maybe some flag in the package have to be set? I've found nothing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
似乎没有办法在 usnig Yum 上安装两个同名的 RPM 包且不会出现文件冲突。
因此,就我而言,我需要使用包名称中包含的某些版本后缀。
Seems there is no way to install two RPM packages with the same name and without file conflicts usnig Yum.
So in my case I need to use some version suffix included into the package name.
我打电话给 RH,他们的初步答复是,在 YUM/RPM 中无法执行此操作,因为这可能会引起混乱。经过他们的工程师的一番讨论,似乎确实有办法做到这一点,但他们说这很麻烦。我已要求他们将他们的文件发送给我(如果有的话)。恐怕您需要拨打他们的客户服务热线并提出相同的要求。
I called RH and their preliminary answer is that there is no way to do this in YUM/RPM as this might cause confusion. After some discussion among their engineers, there does appear to be a way to do this, but they said it is cumbersome. I've asked them to send me their documentation (if any). I'm afraid you will need to call their customer service line and make the same request.
以下是 RH 的回复。
非常感谢您今天抽出时间接电话。您打电话询问是否有一种方法可以使用 yum 来安装不同版本的工具(例如 maven 或 java)。工程师讨论后,他们提供了一份文档,向您展示如何执行此操作。我必须说,如果您没有登录客户门户,您将无法查看整个文档。
如何在Red Hat Enterprise Linux 5和6中切换Java环境?
- https://access.redhat.com/solutions/21059
工程师还提供了额外的文档仅适用于开发人员工具集和软件集合的一般用途:
如何使用红帽软件集合 (RHSCL) 或红帽开发人员工具集 (DTS)?
- https://access.redhat.com/solutions/472793
开发人员工具集和红帽软件集合在红帽企业 Linux 7 中使用
- https://access.redhat.com/solutions/915023
/etc/ 之间有什么区别替代方案和动态软件集合框架?
- https://access.redhat.com/solutions/528643
如果您确实需要进一步帮助,请向我提供有效的帐号、登录名或合同号,我可以开始处理案例,您将能够直接与我们的红帽工程师联系。
Here is the response from RH.
Thank you so much for your time on the phone today. You called asking if there was a way of installing different versions of tools like maven or java using yum to install them. After the engineers discussed it they have provided a document that shows you how to do this. I must say, if you do not have a log in to the customer portal, you will not be able to view the whole document.
How to switch Java Environment in Red Hat Enterprise Linux 5 and 6?
- https://access.redhat.com/solutions/21059
The engineers have also provided additional documents just for general use with Developer Toolset and Software Collections:
How to use Red Hat Software Collections (RHSCL) or Red Hat Developer Toolset (DTS)?
- https://access.redhat.com/solutions/472793
Developer Toolset and Red Hat Software Collections use in Red Hat Enterprise Linux 7
- https://access.redhat.com/solutions/915023
What's the difference between /etc/alternatives and the dynamic software collections framework?
- https://access.redhat.com/solutions/528643
If you do require further assistance, please provide me with a valid account number, login, or contract number, and I can get a case started and you will be able to be in direct contact with one of our Red Hat engineers.