pkg_version and portversion: ports version comparison weirdness

Kevin Oberman kob6558 at gmail.com
Sun Dec 18 18:06:50 UTC 2011


On Sun, Dec 18, 2011 at 8:43 AM, Conrad J. Sabatier <conrads at cox.net> wrote:
> Can anyone explain why I'm seeing the following?
>
> libX11-1.4.99.1                     <   needs updating (index has
> 1.4.4,1)
>
> How is it that version 1.4.99.1 compares as "less than" 1.4.4,1?
> Since when is 99 < 4?
>
> Is it the PORTEPOCH in 1.4.4,1 that's throwing a monkey wrench into the
> works?
>
> This makes no sense to me.  What is the logic being applied here?
>

Yes. When epoch increments it starts the versioning all over. Largest
epoch value ALWAYS is considered "newer" that any smaller epoch value,
regardless of the rest of the version number.

Epoch is normally used when a port needs to be rolled back to an older
version due to a serious problem caused by the newer version. E.g.
xcb-utils-3.6 broke a LOT of stuff, so the epoch was bumped to 1 and
the version was set back to 3.6. Once a port has an epoch applied, it
will never be removed.

-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6558 at gmail.com


More information about the freebsd-ports mailing list