On Mon, Jun 11, 2012 at 02:17:21PM +0100, Matthew Seaman wrote:
> On 11/06/2012 12:55, Baptiste Daroussin wrote:
> > why because they recommand their user to set PKGNAMEPREFIX to
> > ${BLA_PKGNAMEPREFIX} so that their prefix can be set from bsd.port.mk
> > Which mean that until the said bsd.$guilty.mk is included UNIQUENAME name 
> > is set
> > to ${PKGNAMEPREFIX}${PORTNAME} with PKGNAMEPREFIX being expanded to nothing
> > and once bsd.$guilty.mk is included ${PKGNAMEPREFIX} expands to something 
> > and so
> > UNIQUENAME is changed. (btw also break the options framework (old and new) 
> > with
> > the ports because OPTIONSFILE is created using the ${UNIQUENAME}
> 
> A light dawns.  Yes.  The value of $OPTIONSFILE cannot depend on
> anything that happens in the port after bsd.port.options.mk is .include'd.
> 
> How about this (untested):
> 
> % cvs diff
> cvs diff: Diffing .
> Index: bsd.options.mk
> ===================================================================
> RCS file: /home/ncvs/ports/Mk/bsd.options.mk,v
> retrieving revision 1.13
> diff -u -r1.13 bsd.options.mk
> --- bsd.options.mk    6 Jun 2012 11:47:29 -0000       1.13
> +++ bsd.options.mk    11 Jun 2012 13:03:47 -0000
> @@ -8,8 +8,6 @@
>  # global ones and ending with the ones decided by the maintainer.
>  # Options global to the entire ports tree
> 
> -OPTIONSFILE?=        ${PORT_DBDIR}/${UNIQUENAME}/options
> -
>  #ALL_OPTIONS=        DOCS \
>  #            NLS
> 
> Index: bsd.port.mk
> ===================================================================
> RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
> retrieving revision 1.727
> diff -u -r1.727 bsd.port.mk
> --- bsd.port.mk       8 Jun 2012 19:52:39 -0000       1.727
> +++ bsd.port.mk       11 Jun 2012 13:06:35 -0000
> @@ -1268,6 +1268,10 @@
>  UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME}
>  .endif
> 
> +.if !defined(OPTIONSFILE)
> +OPTIONSFILE:=        ${PORT_DBDIR}/${UNIQUENAME}/options
> +.endif
> +
>  .endif
> 
>  DOS2UNIX_REGEX?=     .*
> 
> So OPTIONSFILE is at least independent of any changes to PKGNAMEPREFIX
> made by bsd.$guilty.mk?
> 
> Port maintainers wishing to override the default OPTIONSFILE setting
> should obviously do that before the inclusion of bsd.port.options.mk
> 
>       Cheers,
> 
>       Matthew
> 
> -- 
> Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
>                                                   Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
> JID: matt...@infracaninophile.co.uk               Kent, CT11 9PW
> 
> 
> 


This patch does the trick, I'm now running a script with that patch on to
discovers all the uniquename names which are not really uniq

regards,
Bapt

Attachment: pgp9sq3hX90Pw.pgp
Description: PGP signature

Reply via email to