Skip site navigation (1)Skip section navigation (2)
Date:      19 Apr 2001 14:17:41 -0700
From:      asami@FreeBSD.org (Satoshi - Ports Wraith - Asami)
To:        bmah@FreeBSD.org
Cc:        Kris Kennaway <kris@obsecurity.org>, "David O'Brien" <obrien@FreeBSD.org>, Akinori MUSHA <knu@iDaemons.org>, Chris Faulhaber <jedgar@fxp.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: ports/editors/vim6 Makefile distinfo pkg-plist
Message-ID:  <yfk66g0wpvu.fsf@vader.clickarray.com>
In-Reply-To: <200104191955.f3JJtQV60074@bmah-freebsd-0.cisco.com> (Bruce A. Mah's message of "Thu, 19 Apr 2001 12:55:26 -0700")
References:  <200104111956.f3BJukl93003@freefall.freebsd.org> <20010419140501.A253@jive.44bsd.net> <8666g0d8ws.wl@archon.local.idaemons.org> <20010419122255.B29435@dragon.nuxi.com> <20010419123216.A53260@xor.obsecurity.org> <200104191955.f3JJtQV60074@bmah-freebsd-0.cisco.com>

next in thread | previous in thread | raw e-mail | index | archive | help
 * From: "Bruce A. Mah" <bmah@FreeBSD.org>

 * The Porters Handbook nominally defines this but it doesn't handle the 
 * case of versions with *multiple* letters in them.  Also it doesn't try 
 * to define the semantics of what the letters mean.

That's because when I wrote that section I didn't think that there
would be cases where there are multiple letters, and more than one of
those would be significant. ;) I.e., if the alphabetical string in the
version number is "alpha", "beta", etc., you can just take the first
letter and have it sort before the numbers.

1.0alpha  -> 1.0.a
1.0beta1  -> 1.0.b1
1.0beta2  -> 1.0.b2
1.0       -> 1.0
1.1alpha  -> 1.1.a

and so on.  (The things on the right are supposed to sort in this
order.)

Of course, it will still break down with 1.0gamma -> 1.0.g sorting
before 1.0delta -> 1.0.d, but most software only have alpha, beta and
release candidates (and they all come before real releases, in this
order). ;)

As for multiple letters, I think the only sensible thing to do if it
is really necessary is to compare them in dictionary order.

 * Also note that pkg_version has to handle some cases that are technically
 * not allowed by the Porters Handbook.  Technically there can't be a
 * letter after a digit where there isn't an intervening dot, but a lot of
 * ports do this anyways.  (Why is this disallowed?  Heck if I know.)

I thought it would make the semantics unclear.  The idea is to compare
version components (strings between dots) as whole integers if they
are composed entirely of digits, and as strings if they have at least
one non-digit in them.

That works reasonably well with the examples shown above, except when
the beta goes to 10, we'll have 1.0.b10 which will sort before 1.0.b9
in dictionary order.

Do you think we should treat the string of digits and string of
non-digits separately, and sort them in numerical order and in
dictionary order, respectively?  That will handle the 1.0.b10 case as
well as allowing a 1.0b release to follow 1.0 release (like emacs did
with 19.34 and 19.34b).

-PW

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?yfk66g0wpvu.fsf>