Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Sep 2009 02:04:22 +0200 (CEST)
From:      Gerald Pfeifer <gerald@pfeifer.com>
To:        Ade Lovett <ade@FreeBSD.org>, ports@FreeBSD.org
Subject:   Re: My plan to fix the versioning for lang/gcc ports
Message-ID:  <alpine.LSU.1.99.0909140157050.15831@acrux.dbai.tuwien.ac.at>
In-Reply-To: <E6DB38E4-C650-4DB7-9666-11D2AE6D8FDE@FreeBSD.org>
References:  <alpine.LSU.1.99.0905190141510.24313@acrux.dbai.tuwien.ac.at> <E6DB38E4-C650-4DB7-9666-11D2AE6D8FDE@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Ade, I think I haven't thanked you for your input and recommendation
on this.

On Tue, 19 May 2009, Ade Lovett wrote:
>> PORTVERSION=  4.3.4.20090517
> Rather than going that way, why not take a leaf out of "standard" 
> practice for DNS SOA serial numbers, and go with:
> 
> 	PORTVERSION=  4.3.4
> 	PORTREVISION= ${SNAPDATE}${SNAPREVISION}
> 
> 	SNAPDATE=     20090517
> 	SNAPREVISION= 00

This immediately resonated, and I liked the idea a lot.  There is one 
killer argument which made me go for the somewhat more tricky approach
to pack all that into PORTVERSION and not touch PORTREVISION, and that
was the occasional need -- by third parties -- to do a PORTREVISION bump
using Tools/bump_revision.pl or the like.

> Probably a lot less work in the long run.

The current approach is not a lot more work, but inded three non-
immediate Makefile variable tricks.  From lang/gcc45:

  PORTVERSION=    4.5.0.20090910
  VERSIONSTRING=  ${PORTVERSION:C/([0-9]+\.[0-9]+).*\.([0-9]+)/\1-\2/}
  SUFFIX=         ${PORTVERSION:C/([0-9]+).([0-9]+).*/\1\2/}
  PLIST_SUB=      GCC_VER=${PORTVERSION:C/(.+)\.[0-9]+/\1/} \

I have using this for a couple of months across all lang/gcc4x ports,
and it's been working well.

Gerald



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