2

I'm looking for information on whether there is an easier way to do this. I have set up a company repo, we use custom packages for a few items. What I want to avoid is this package being installed or updated from another repo (base, extras, updates, or any other repo that is installed).

Right now I have in /etc/yum.conf under [main]:

exclude=package*

So this solves my above concern. However, when I actually want to install or update this package from the company repo, I end up having to run:

yum --disableexcludes=all --disablerepo="*" --enablerepo="company" package

This is ugly and prevents yum from using the other repos for dependencies and just --disableexcludes="company" didn't work.

So is there a way to exclude "package*" from all repos except "company" without having to go into every repo file?

  • By the time you get to this point, it may be worth mirroring your OS's package repo, and using --exclude options to rsync on the copy. – Warren Young Apr 2 '15 at 16:52
  • Seems like overkill. Fedora, for example, I think has close to 10,000 packages. This also wouldn't help us if another repo was installed and had a package conflict. – Devon Apr 2 '15 at 17:03
  • That's why I posted it as a comment instead of an answer: I know it's more complex than your current solution. But, you're kind of making your own bed here. You're wanting to grab packages from many different places but also control who gives you what. I'm not sure there's a whole lot of value in the middle ground between active and passive stances on software sources. I'm imaging an inverted Gaussian curve with control over packages on the X and utility on the Y. The farther you get from the extremes on X, the less sensible the activity. Best is almost completely passive or active. – Warren Young Apr 2 '15 at 17:11
  • My 2 cents is stick to the public repo, you are setting yourself up for trouble having private repo for the organization. Odds are your organization is getting it's repos from a public source anyway, so why make another middle man. I know.. I know.. "security concerns". Still doesn't make sense to me! – Baazigar Apr 2 '15 at 18:38
  • @Baazigar: Not sure what you mean by "Odds are your organization is getting it's repos from a public source anyway". We have about 30 custom built RPMs that need to be effectively distributed across serveral hundred servers. A private repo seems to be the most efficient method. – Devon Apr 2 '15 at 18:49

Your Answer

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

Browse other questions tagged or ask your own question.