seveas / yum_plugin_puppet

MIT License
11 stars 1 forks source link

Doing "yum install-remove ~B A" where A depends on B will cause flip-flopping installations #7

Open avar opened 9 years ago

avar commented 9 years ago

I'd like to use this for:

yum install-remove ~all ~the ~things ~I ~do ~not ~want all the things I do want

I.e. I have a computed list of packages that should be installed, but some of those packages might implicitly bring in dependencies. This is a general problem with RPM because if the dependencies aren't declared as "==" in the spec files but ">=" you'll end up with whatever the latest version is. Then when someone builds a new machine you silently have a mixture of old and new versions in production.

The problem is that if package A is declared but depends on package B which is undeclared this:

yum install-remove A ~B

Will result in yum removing both A and B the first time you run this, the second time it'll install both, and so on as you try to run this again.

What I'd like this to do instead is error out if you give it a transaction where some of the things you're trying to remove are dependencies for some of the things you're trying to install.