About 'cost' in repo conf?
Bill Davidsen
davidsen at tmr.com
Mon Oct 22 14:23:37 UTC 2012
Sergio wrote:
>
>> In the yum.conf manual is:
>> "cost: relative cost of
>> accessing this repository. Useful for weighing one
>> repo's packages as greater/less than any other. defaults to
>> 1000"
>>
>> At first I thought I could use that to set a repo priority
>> but it doesn't work (I set cost to both >1000 and
>> <1000 and ran 'yum clean all' after any change to check).
>> The latest version of a package is offered regardless of
>> those settings.
>> So that 'cost' setting is only for packages of the same
>> version in different repos?
>>
>> I know there's a priority plugin for yum and I'll use it.
>>
>> Best regards.
>
> I read a little about priorities and I'm using the 'exclude' option instead.
> As for the 'cost' option, maybe if I need to choose between packages of the same version and different repos one day I'll test it again.
>
The cost option, as you have discovered, is for prioritizing repos which all
have the latest version. I run a local repo for packages I have upgraded on any
machine on site, so it only holds packages I actually use. In that case the cost
option seems to force use of the local repo, assuming it is up-to-date.
Seems to be the right option for what I do.
Before someone asks, I just set the keep flag in yum.conf, then run a script to
move packages to the master local repo, where "createrepo" updates things to
make them available.
--
Bill Davidsen <davidsen at tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
More information about the users
mailing list