How to only allow exact package updates from a repository?

In the repo file, add a line that says:

includepkgs=google-chrome*

This will only allow updates and installs of packages named google-chrome* from that repo, all other packages will be ignored. You can list multiple packages if you separate them by a space.

In a more general sense, there's no good way of handling the problem of repos having conflicting RPMs. You have to choose good repos where you trust the maintainer (I always recommend EPEL). There's a few plugins out there which might help you such as yum-priorities and yum-protectbase but I've always used the incpludepkgs method. It's a little more work but I can sleep better at night knowing some RPM from some repo won't blow away some other RPM from a different repo when I don't want it too.

Tags:

Yum