Re: Yum Package Version

James Antill <[email protected]> Wed, 07 May 2014 17:10:47 -0400
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
"McCully, Sean" <[email protected]> writes:

> Hi,
>
> I am trying to do determine how yum decides which rpm is the latest version.  For instance, I have created a repo with createrepo command, and have rpm(s) as such,
>
>
>   *   my-package-2014-05-05-12345-200.rpm
>   *   my-package-2014-05-05-12346-200.rpm
>   *   my-package-2014-05-05-12347-201.rpm
>   *   my-package-2014-05-06-12348-201.rpm

>
> When I ask yum to install my-package, it appears to pick arbitrarily
> a version.

 This is not a valid set of rpms for "my-package". It is a valid set
of rpm files for _two_ packages, one named "my-package-2014-05-05" and
the other named "my-package-2014-05-06".

 In a more generic sense, you can't have an rpm with a '-' in the
version or release. Modern versions of rpmbuild will now enforce
this in provides/requires/conflicts/etc. I thought all versions of
rpmbuild would enforce that for Version/Release though.
 Assuming you have created those rpms somehow, if you change the '-'
to '_' or '.' ... it should behave how you expect.

-- 
James Antill -- [email protected]