pkg_version and portversion: ports version comparison weirdness

Conrad J. Sabatier conrads at cox.net
Sun Dec 18 18:13:35 UTC 2011


On Sun, 18 Dec 2011 10:06:48 -0800
Kevin Oberman <kob6558 at gmail.com> wrote:

> 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.

I suspected that was the case, but wasn't sure exactly how the epoch
setting was intended to be used.
 
> 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.

Ah, OK.  Thank you.  I had never really understood the meaning of the
PORTEPOCH variable.  Nice to finally have it explained.

Regards,

Conrad

-- 
Conrad J. Sabatier
conrads at cox.net


More information about the freebsd-ports mailing list