standardized conclusion required for rpm upgrade process

夙愿已清 提交于 2019-12-11 07:55:31

问题


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.

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. Is this the standard conclusion or
  2. should I stop installing the second instance of the package along with the first instance by writing any wrapper script or by adding code in spec file section.

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


回答1:


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

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}


来源:https://stackoverflow.com/questions/8502567/standardized-conclusion-required-for-rpm-upgrade-process

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!