[Yum] specifying a version range to yum

James Antill james-yum at and.org
Tue Feb 5 17:53:52 UTC 2013


Jay Buffington <me at jaybuff.com> writes:

> Hi,
>
> I know I can give yum a version requirement.   For example, this gives
> me foo at a version 0.7.8 or newer, which is just what I want:
>
> $ yum install 'foo >= 0.7.8'
>
> But say I want to be able to specify a max and a min at the same time.
>  Something like this:
>
> $ sudo yum install 'foo <= 0.7.9, >= 0.7.8'

 There is no command that would accept that atm. ... in theory you
could write one as a plugin, however this will almost certainly do the
same thing:

sudo yum install 'foo <= 0.7.9'


...because yum chooses the highest version available.

> Is there any way I can give yum a range of versions that satisfy the
> package version I want?  If not on the command line could I do it
> directly interfacing with the python libraries?

 With the python API you can pretty much do anything, as at worst you
can get a list of all the packages with a given name and then filter
them yourself and ask yum "install this package".

-- 
James Antill -- james at and.org


More information about the Yum mailing list