1

We use RPMS for our packaging and yum to update our environments.

We have an rpm package-5.1.1-3 installed in our production server and in our yum repository we have 2 newer versions such as package-5.1.3-3 and package-5.2-27.

Using yum, we tried to install package-5.1.3-1 but yum installed package-5.2-27.

It caused serious problems in production.

If we remove 5.2-27 package from our custom yum repository and try installing 5.1.3-1, it's installing as expected.

I think yum should allow installation of specific version of RPMS and I remember doing this few times. I tried to debug but no success.

Package already installed:

root@snelloru]# rpm -qa|grep package
pacakge-database-5.1.1-3
package-5.1.1-3

Installing higher version(5.1.3-1)

yum install package-5.1.3-1
Loaded plugins: rhnplugin, security
Excluding Packages in global exclude list
Finished
Setting up Install Process
Package matching package-5.1.3-1.x86_64 already installed. Checking for update.
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: package = 5.1.1-3 for package: package-database
---> Package package.x86_64 0:5.1.3-1 set to be updated
--> Running transaction check
---> Package package-database.x86_64 0:5.2-23 set to be updated
--> Processing Dependency: package = 5.2-23 for package: package-database
--> Running transaction check
---> Package package.x86_64 0:5.1.3-1 set to be updated
---> Package package.x86_64 0:5.2-23 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================
 Package             Arch      Version      Repository    Size
===============================================================
 package             x86_64    5.2-23       repo          22 M
 package-database    x86_64    5.2-23

Output of yum list --showduplicates package package-database

root@snelloru]# yum list --showduplicates package package-database
Loaded plugins: allowdowngrade, security
rightscale-epel                                       |  951 B     00:00
Installed Packages
package.x86_64                        5.1.1-3            installed
package-database.x86_64               5.1.1-3            installed
Available Packages
package.x86_64                        5.1-126            repo
package.x86_64                        5.1.1-3            repo
package.x86_64                        5.1.2-3            repo
package.x86_64                        5.1.3-1            repo
package.x86_64                        5.2-25             repo
package.x86_64                        5.2-26             repo
package.x86_64                        5.2-27             repo
package-database.x86_64               5.1-126            repo
package-database.x86_64               5.1.1-3            repo
package-database.x86_64               5.1.2-3            repo
package-database.x86_64               5.1.3-1            repo
package-database.x86_64               5.2-2              repo
package-database.x86_64               5.2-3              repo
package-database.x86_64               5.2-4              repo
package-database.x86_64               5.2-24             repo
package-database.x86_64               5.2-25             repo
package-database.x86_64               5.2-26             repo
package-database.x86_64               5.2-27             repo

My observation:

If we try to install package of same version which is already installed in the server but with different release number, its working as expected.

For example if we have 5.2-10 installed in the server and if we try to install 5.2-20 its working as expected though we have higher releases like 5.2-25..5.2-28 are present in repo.

Its not working only when we have different version of rpm is installed

Any ideas on this??

Cristian Ciupitu
  • 6,396
  • 2
  • 42
  • 56
Sridhar
  • 111
  • 3
  • Did you notice it is clearly stating that package-5.1.3-1 is *already* installed? –  Jun 25 '14 at 19:11
  • ohh yes, that the problem. Actually 5.1.1-3 was installed. but yum matches that 5.1.1-3 with 5.1.3-1 and says it already installed. I updated my question to avoid confusion. Thanks – Sridhar Jun 25 '14 at 19:16
  • 1
    Gotcha. Yum doesn't allow downgrades by default. There are plugins to allow this behavior but I usually just uninstall the old one first. –  Jun 25 '14 at 19:18
  • What is the result of `yum list --showduplicates package package-database` – jeffatrackaid Jun 25 '14 at 19:19
  • @jeffatrackaid, added output of yum list --showduplicates to my question description. – Sridhar Jun 25 '14 at 19:57
  • You may have a naming issue. You may want to compare package information between two packages using `rpm -qp` in your repo. I don't see why you would get this behavior without a repo data, package naming or corrupted RPM database. – jeffatrackaid Jun 25 '14 at 20:07
  • I verified package naming and RPM database too, nothing looks bad. What I noticed is, If we try to upgrade rpm of same version but different release(rpm-file-version),then its working as expected. I mean if we have 5.2-10 installed and we have 5.2-20...5.2-28 in RPM repo, and if you try to install 5.2-20 its working as expected. – Sridhar Jun 25 '14 at 21:38

0 Answers0