rpm升级过程所需的标准化结论 [英] standardized conclusion required for rpm upgrade process

查看:129
本文介绍了rpm升级过程所需的标准化结论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

rpm命令提供了用于升级和安装软件包的三个主要操作: 升级 升级操作意味着安装软件包的新版本并删除同一软件包的所有先前版本.如果以前没有安装软件包,则升级操作将安装该软件包. 刷新 刷新操作意味着仅当您已经安装了该程序包的另一个版本时,才安装该程序包的新版本. 安装 安装操作是第一次安装软件包.它还通过特殊的命令行参数,允许您安装软件包的多个版本,通常不是我们想要的版本.因此,在大多数情况下,您希望对所有软件包安装都运行升级操作.

The rpm command provides three main operations for upgrading and installing packages: Upgrade An upgrade operation means installing a new version of a package and removing all previous versions of the same package. If you have not installed a package previously, the upgrade operation will install the package. Freshen A freshen operation means to install a new version of a package only if you have already installed another version of the package. Install An install operation installs a package for the first time. It also, through special command-line parameters, allows you to install multiple versions of a package, usually not what we want. So, in the vast majority of cases, you want to run the upgrade operation for all package installations.

通常应使用 rpm -U,而不是rpm -i 安装软件包.主要原因之一是rpm -i允许您安装相同(相同)软件包的多个实例.

Should normally install packages with rpm -U, not rpm -i. One of the main reasons is that rpm -i allows you to install multiple instances of the same (identical) package.

  1. 这是标准结论还是
  2. 我应该通过编写任何包装脚本或在spec文件部分中添加代码来停止将软件包的第二个实例与第一个实例一起安装.

如果答案是2分,该如何实现.请指导我有关这种混乱的情况.

If 2 point is the answer how can achieve this. Please guide me about this confusion.

推荐答案

假定每个人只希望一次安装一个版本的RPM,然后使用"rpm -U".

Assuming you only every want one version of an RPM installed at once, then yes use "rpm -U".

创建可以安装多个版本的RPM要求版本之间的所有公用文件都相同.这种情况经常发生,因此您可能会在默认情况下"获得此行为.

Creating an RPM that can have multiple versions installed requires that all common files between the versions are identical. This frequently happens, so you may get this behaviour "by default".

您还可以在您的规范中使用以下内容阻止多个版本:

You can also prevent multiple versions with the following in you spec:

Conflicts : %{name} < %{version}

这篇关于rpm升级过程所需的标准化结论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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