[Yum] Package management strategy with yum

seth vidal skvidal at phy.duke.edu
Wed Mar 30 17:55:51 UTC 2005


On Wed, 2005-03-30 at 12:01 -0500, Matthew Miller wrote:
> On Wed, Mar 30, 2005 at 10:24:56AM -0500, Sean Dilda wrote:
> > I can't find anything to do what you're asking.  Since this looks like 
> > something you're wanting to script, it may be easiest to have the script 
> > look at /etc/yum.repos.d/ and construct the command line for you so that 
> > it disable all repos but yours and enables the ones you want.
> 
> Gah! Then my script has to understand how to parse repo files and so on.
> That'd work as a kludge, but it's pretty ugly.

no
it doesn't.


in yum 2.2.1 and 2.3.1 you can do:

yum --disablerepo='*' and then --enablerepo=myrepo 

and it works like you'd expect.

better yet though.

yum --disabelrepo='*' --enablerepo='goodrepos*' works, too

so you can just name your repos in reliable ways if you wanted to.

another option for yum 2.3.2(not released yet) would be:

yum shell
repo disable *
repo enable repo1 repo2 repo3
config assumeyes True
config debuglevel 0
config errorlevel 0
upgrade
run


-sv





More information about the Yum mailing list