LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   standardized conclusion required for rpm upgrade process (https://www.linuxquestions.org/questions/linux-software-2/standardized-conclusion-required-for-rpm-upgrade-process-918662/)

sr164w 12-14-2011 04:02 AM

standardized conclusion required for rpm upgrade process
 
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 2nd point is the answer how can achieve this. Please guide me about this confusion.

MensaWater 12-14-2011 08:48 AM

If you're using rpm to install you are specifying the packages so it should be easy to determine if you have the same package multiple times.

rpm -i does NOT automatically install the same package multiple times - you have to force it to install a package more than once. Note that a package with .i386 (.i686) in its name is NOT the same as one with .x86_64 even if the rest of the name is the same. One is 32 bit and the other is 64 bit and you can have both packages on the same machine with out an issue.

What Linux distro are you using? Most people these days use yum package management as it will detect dependencies and conflicts for doing multiple packages. Usually rpm is only used to install small sets of packages for specific purposes that do not appear in any of your yum repositories. (Type "man yum" for more information.)

sr164w 12-14-2011 09:32 AM

rpm does not install same package multiple times.
but if i use rpm -i rpm installs multiple versions of same package. I want to avoid this installation of multiple versions of same package.
my confusion is only using the rpm -U is the solution or is there anything else to upgrade the rpm package installation.

MensaWater 12-14-2011 10:15 AM

If you reread what you posted for the install option you can see that it says you should usually use the upgrade option because you usually don't want multiple versions. I misunderstood your earlier question. The answer is yes, use upgrade option. If the package isn't there then Upgrade will install it, if earlier version is there then Upgrade will replace it with the newer version.

Again however, I'd urge you to learn and use yum.

sr164w 12-14-2011 10:19 AM

thanks for the reply!!

I wanted to suggest to our customer to use this upgrade option always instead of install in the first installation.
So wanted to get few more votes and agrees on this proposal of using upgrade option.

thank u again!!


All times are GMT -5. The time now is 06:24 PM.