1

I have to implement two yum repos, x and y which contains same packages with different versions.

If a user do:

  1. yum install x - should install the latest packages of one branch
  2. yum install y - should install the stable version from different branch

When I execute yum install x, installs the latest version package from x repository, but when I execute, yum install y, doesn't work as expected though I have created meta packages.

I have experimented with yum plugins protect, priority. Both plugins works as expected but removes the other package versions.

I am able to execute yum install y, but unable to execute yum install x afterwards.

I should be able to execute both repositories in one server.

Could you please suggest me, how to achieve this in yum? I have to implement it in server.

3
  • Sounds a little broken by design by the description you provided. Usually this is done by using different package names like foo-stable or foo-latest or something like that. It would help if you could add some more details regarding the versions of your packages x and y.
    – doktor5000
    Commented Aug 4, 2015 at 19:01
  • The package name of both repo's same. Like foo is the package. Rpm looks like foo-1.1-buildnum-x86_64.rpm. Buildnum differs. We have cricteria not to modify the package name Commented Aug 5, 2015 at 6:28
  • Yep, that is basically broken by design, your problem is not the repo definition but rpm name/epoch/version/release comparison. You can either install a specific version, or install the latest by only using the name, and if you want the "older" version then use yum downgrade or rpm --oldpackage to downgrade. What you still could do is to add a Provides: name-latest to the package, and Provides: name-stable to the one with the lower version number, so you don't have to change the package name but still have a way to select between both packages. You can also use a versioned Provides.
    – doktor5000
    Commented Aug 6, 2015 at 19:10

1 Answer 1

0
  • Check out yum upgrade-to x-version (like x-1.0.1). Maybe that is what you need
  • You can use yum --disablerepo in order to use only the relevant repository (latest or stable)
2
  • Is there any other way to implement apart from disablerepo. I cannot inform user to disable repo to install the package. Commented Aug 4, 2015 at 11:22
  • Not that I'm aware of. Lets see what others will answer. upgrade-to won't help? Commented Aug 4, 2015 at 11:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .