Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Aug 2015 10:08:25 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        Romain Tarti?re <romain@blogreen.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r394390 - in head/lang/mono: . files
Message-ID:  <20150816100825.GA77913@FreeBSD.org>
In-Reply-To: <20150816091404.GA8322@blogreen.org>
References:  <201508160654.t7G6slkR012462@repo.freebsd.org> <20150816080547.GA27946@FreeBSD.org> <20150816091404.GA8322@blogreen.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 16, 2015 at 11:14:04AM +0200, Romain Tarti?re wrote:
> On Sun, Aug 16, 2015 at 08:05:47AM +0000, Alexey Dokuchaev wrote:
> > >  PORTNAME=	mono
> > > -PORTVERSION=	4.0.1.28
> > > +PORTVERSION=	4.0.3.20
> > >  CATEGORIES=	lang
> > > [...]
> > > -WRKSRC=	${WRKDIR}/mono-4.0.1
> > > +WRKSRC=	${WRKDIR}/mono-4.0.3
> > 
> > You could've used ${PORTVERSION:R} instead of literal 4.0.3, it would allow
> > you not to touch this line on subsequent updates.
> 
> The problem is that upstream is quite inconsistent and started to use 3
> or 4 groups of number as the version number for the archive while the
> directory name only has 3 groups of digits.
> 
> [...]
> 
> I'm not sure about a future '4.0.4' without the fourth part which needs
> no adjustment.  Any generic solution here would be really cute!

I see.  Personally I'd try to avoid hardcoding numbers: ${PORTVERSION:R}
would work for the next minor update; if the next update turns out to be
major (three-digit), it should be changed to ${PORTVERSION}.  At least in
this case, there is a chance that you won't have to adjust WRKSRC.  When
using hardcoded numbers, you 100% would have to change that line on every
update, be it minor or major (better put, 3- or 4-digit).

./danfe



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