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.

  • 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 Aug 4 '15 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 – Renuka Pampana Aug 5 '15 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 Aug 6 '15 at 19:10
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)
  • Is there any other way to implement apart from disablerepo. I cannot inform user to disable repo to install the package. – Renuka Pampana Aug 4 '15 at 11:22
  • Not that I'm aware of. Lets see what others will answer. upgrade-to won't help? – Eran Ben-Natan Aug 4 '15 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.