Re: [SOLVED] Re: optionsng ignores /var/db/ports/portname/options

2012-06-04 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/4/12 2:32 PM, Roland Smith wrote:
 On Sun, Jun 03, 2012 at 09:10:03PM +0200, Roland Smith wrote:
 On Sun, Jun 03, 2012 at 07:18:26PM +0100, Matthew Seaman wrote:
 On 03/06/2012 17:05, Roland Smith wrote:
 I've used 'make config' to set the PYCAIO option to on;
 
 slackbox# cat /var/db/ports/py27-py-stl/options # This file
 is auto-generated by 'make config'. # Options for
 py27-py-stl-3.1 _OPTIONS_READ=py27-py-stl-3.1 
 _FILE_COMPLETE_OPTIONS_LIST=PYCAIRO 
 OPTIONS_FILE_SET+=PYCAIRO
 
 But the port seems to ignore it:
 
 slackbox# make showconfig === The following configuration
 options are available for py27-py-stl-3.1: PYCAIRO=off: Use
 (py)Cairo to enable stl2pdf === Use 'make config' to modify
 these settings
 
 Every time I do 'make config', the PYCAIRO option will be
 unset, even if it shows as set in
 /var/db/ports/portname/options!
 
 What does
 
 % make -V PORT_OPTIONS
 
 slackbox# pwd /usr/ports/graphics/py-stl slackbox# make -V
 PORT_OPTIONS DOCS EXAMPLES NLS
 
 show?  If PYCAIRO is set in PORT_OPTIONS, then the port is
 accepting your setting of the option, and you've found a bug
 with the showconfig target.  (If so, please open a PR.)
 
 Well, it was a bug, but not particularly in showconfig alone, see
 below.
 
 If not, then something odd is happening, as your port looks
 perfectly OK to me.  Are you using a ports tree updated within
 about the last 48 hours or so?  I know there were some bug
 fixes went in to all FOO_DESC lines to contain (brackets) and
 other syntactically significant characters.
 
 I updated my ports tree this afternoon. The really weird thing is
 that I tested 'make config' in several other ports where it
 worked fine...
 
 PS. Asking this on freebsd-ports@... might be a good idea.
 
 The bad news is that it was a bug in the ports system. It turned
 out that because of the way the unique name of the port was set
 (which happens twice), the options file is not read from the same
 directory that it is written to! Thanks to Baptiste Daroussin for
 clueing me in in this. I've gained a new respect for the people
 maintaining the ports infrastructure. :-) It's kind of amazing it
 works as well as it does.
 
 The good news is that there are several workarounds. For future
 reference, the workaround that I ended up using was to set the
 following variable in the port makefile:
 
 OPTIONSFILE=${PORT_DBDIR}/py27-${PORTNAME}/options
 
 
 Roland

Hi Roland,

I don't think you want to hardcode the py27- in the variable
assignment, since it ties the filename to a specific version of
Python.  Check PYTHON_PKGNAMEPREFIX, and it should adjust itself as
the Python version changes.

Hope that helps,
Greg
- -- 
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/cpucycle/  - Follow you, follow me
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/NFBcACgkQ0sRouByUApDtRgCgl0NvUTwexNS1TdZqqXElKWPX
SggAn1b/QRnU8rhwbtu0mebByp+IRB3A
=+ly7
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [SOLVED] Re: optionsng ignores /var/db/ports/portname/options

2012-06-04 Thread Roland Smith
On Mon, Jun 04, 2012 at 04:01:27PM -0400, Greg Larkin wrote:
  Well, it was a bug, but not particularly in showconfig alone, see
  below.
  
  If not, then something odd is happening, as your port looks
  perfectly OK to me.  Are you using a ports tree updated within
  about the last 48 hours or so?  I know there were some bug
  fixes went in to all FOO_DESC lines to contain (brackets) and
  other syntactically significant characters.
  
  I updated my ports tree this afternoon. The really weird thing is
  that I tested 'make config' in several other ports where it
  worked fine...
  
  PS. Asking this on freebsd-ports@... might be a good idea.
  
  The bad news is that it was a bug in the ports system. It turned
  out that because of the way the unique name of the port was set
  (which happens twice), the options file is not read from the same
  directory that it is written to! Thanks to Baptiste Daroussin for
  clueing me in in this. I've gained a new respect for the people
  maintaining the ports infrastructure. :-) It's kind of amazing it
  works as well as it does.
  
  The good news is that there are several workarounds. For future
  reference, the workaround that I ended up using was to set the
  following variable in the port makefile:
  
  OPTIONSFILE=${PORT_DBDIR}/py27-${PORTNAME}/options
  
  
  Roland
 
 Hi Roland,
 
 I don't think you want to hardcode the py27- in the variable
 assignment, since it ties the filename to a specific version of
 Python.  Check PYTHON_PKGNAMEPREFIX, and it should adjust itself as
 the Python version changes.

Actually, if I understood correctly, the fact that PYTHON_PKGNAMEPREFIX
_changes_ from py- to py27- in different parts of the included .mk files is
what causes the problem in the first place. So I did this on purpose.

Roland
-- 
R.F.Smith   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpT3JboMQ8pu.pgp
Description: PGP signature


Re: [SOLVED] Re: optionsng ignores /var/db/ports/portname/options

2012-06-04 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/4/12 5:25 PM, Roland Smith wrote:
 On Mon, Jun 04, 2012 at 04:01:27PM -0400, Greg Larkin wrote:
 Well, it was a bug, but not particularly in showconfig alone,
 see below.
 
 If not, then something odd is happening, as your port
 looks perfectly OK to me.  Are you using a ports tree
 updated within about the last 48 hours or so?  I know there
 were some bug fixes went in to all FOO_DESC lines to
 contain (brackets) and other syntactically significant
 characters.
 
 I updated my ports tree this afternoon. The really weird
 thing is that I tested 'make config' in several other ports
 where it worked fine...
 
 PS. Asking this on freebsd-ports@... might be a good idea.
 
 The bad news is that it was a bug in the ports system. It
 turned out that because of the way the unique name of the port
 was set (which happens twice), the options file is not read
 from the same directory that it is written to! Thanks to
 Baptiste Daroussin for clueing me in in this. I've gained a new
 respect for the people maintaining the ports infrastructure.
 :-) It's kind of amazing it works as well as it does.
 
 The good news is that there are several workarounds. For
 future reference, the workaround that I ended up using was to
 set the following variable in the port makefile:
 
 OPTIONSFILE=${PORT_DBDIR}/py27-${PORTNAME}/options
 
 
 Roland
 
 Hi Roland,
 
 I don't think you want to hardcode the py27- in the variable 
 assignment, since it ties the filename to a specific version of 
 Python.  Check PYTHON_PKGNAMEPREFIX, and it should adjust itself
 as the Python version changes.
 
 Actually, if I understood correctly, the fact that
 PYTHON_PKGNAMEPREFIX _changes_ from py- to py27- in different parts
 of the included .mk files is what causes the problem in the first
 place. So I did this on purpose.
 
 Roland

Hi Roland,

Ok, I should have read the previous thread emails more closely.  At
any rate, putting a specific Python version into the name of the
OPTIONSFILE seems a bit confusing.  Could you achieve the same outcome
by putting py- instead of py27- in the name?

Regards,
Greg
- -- 
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/cpucycle/  - Follow you, follow me
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/NYqIACgkQ0sRouByUApBeJACgyuHOEkwVWIdVq31XkLtd89AQ
GWsAoLzZpiKWOAe2u8sEWEM/kGvvnmT+
=JKWu
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [SOLVED] Re: optionsng ignores /var/db/ports/portname/options

2012-06-04 Thread Roland Smith
On Mon, Jun 04, 2012 at 09:36:35PM -0400, Greg Larkin wrote:
  Hi Roland,
  
  I don't think you want to hardcode the py27- in the variable 
  assignment, since it ties the filename to a specific version of 
  Python.  Check PYTHON_PKGNAMEPREFIX, and it should adjust itself
  as the Python version changes.
  
  Actually, if I understood correctly, the fact that
  PYTHON_PKGNAMEPREFIX _changes_ from py- to py27- in different parts
  of the included .mk files is what causes the problem in the first
  place. So I did this on purpose.
  
  Roland
 
 Hi Roland,
 
 Ok, I should have read the previous thread emails more closely.  At
 any rate, putting a specific Python version into the name of the
 OPTIONSFILE seems a bit confusing. 

OTOH, it keeps the name of /var/db/port/name/options in line with the
packagename (without the version number), and it is what most Python-based
ports seem to do.

 Could you achieve the same outcome
 by putting py- instead of py27- in the name?

Yes, more or less. There are ports that do that as well. But the majority seem
to include the python version. AFAICT to be able to install the same package
with different options for different Python versions. 

Anyway, the PR for updating my port is out. And one of the maintainers is
working on some of the warts of the ports system. It turns out that this bug
was already reported two years ago. But the ports system is quite a complex
beast...  

Roland
-- 
R.F.Smith   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpTktPUUskY4.pgp
Description: PGP signature