From owner-freebsd-questions@FreeBSD.ORG Mon Jun 4 20:01:36 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E2091065675; Mon, 4 Jun 2012 20:01:36 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (mail1.sourcehosting.net [74.205.51.45]) by mx1.freebsd.org (Postfix) with ESMTP id 4D7148FC1C; Mon, 4 Jun 2012 20:01:36 +0000 (UTC) Received: from 24-181-237-39.dhcp.oxfr.ma.charter.com ([24.181.237.39] helo=Gregory-Larkins-iMac.local) by mail1.sourcehosting.net with esmtp (Exim 4.73 (FreeBSD)) (envelope-from ) id 1SbdSy-000BCL-Po; Mon, 04 Jun 2012 16:01:35 -0400 Received: from Gregory-Larkins-iMac.local (localhost [127.0.0.1]) by Gregory-Larkins-iMac.local (Postfix) with ESMTP id 375E812BE321; Mon, 4 Jun 2012 16:01:28 -0400 (EDT) Message-ID: <4FCD1417.4060000@FreeBSD.org> Date: Mon, 04 Jun 2012 16:01:27 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Roland Smith References: <20120603160518.GA6631@slackbox.erewhon.net> <4FCBAA72.7020103@FreeBSD.org> <20120603191003.GA8028@slackbox.erewhon.net> <20120604183234.GC14162@slackbox.erewhon.net> In-Reply-To: <20120604183234.GC14162@slackbox.erewhon.net> X-Enigmail-Version: 1.4.1 X-SA-Exim-Connect-IP: 24.181.237.39 X-SA-Exim-Mail-From: glarkin@FreeBSD.org X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail1.sourcehosting.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_RP_RNBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,SARE_ADLTSUB4,TVD_RCVD_IP autolearn=no version=3.3.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on mail1.sourcehosting.net) Cc: Matthew Seaman , freebsd-questions@freebsd.org Subject: Re: [SOLVED] Re: optionsng ignores /var/db/ports//options X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 20:01:36 -0000 -----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//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-----