From nobody@FreeBSD.org  Mon Apr 10 12:21:33 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B209216A400
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Apr 2006 12:21:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 64E0043D45
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Apr 2006 12:21:33 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k3ACLXcM002756
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Apr 2006 12:21:33 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k3ACLXni002755;
	Mon, 10 Apr 2006 12:21:33 GMT
	(envelope-from nobody)
Message-Id: <200604101221.k3ACLXni002755@www.freebsd.org>
Date: Mon, 10 Apr 2006 12:21:33 GMT
From: "Matthew X. Economou" <xenophon+fbsdports@irtnog.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: A port's "USE_ZOPE=yes" overrides PYTHON_VERSION if set by the package builder
X-Send-Pr-Version: www-2.3

>Number:         95584
>Category:       ports
>Synopsis:       [patch] bsd.python.mk: A port's "USE_ZOPE=yes" overrides PYTHON_VERSION if set by the package builder
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    perky
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 10 12:30:16 GMT 2006
>Closed-Date:    Thu Aug 14 23:16:11 UTC 2008
>Last-Modified:  Thu Aug 14 23:16:11 UTC 2008
>Originator:     Matthew X. Economou
>Release:        5.4-RELEASE
>Organization:
IRTNOG.ORG
>Environment:
FreeBSD cinep011fbvoip.irtnog.org 5.4-SECURITY FreeBSD 5.4-SECURITY #0: Tue Feb 28 20:13:51 UTC 2006     root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Ports that define "USE_ZOPE=yes" in their Makefiles ignore the value
of PYTHON_VERSION set either in /etc/make.conf or on the make command
line.  This can cause problems for combinations of Python programs
that only work properly with a specific version of the run-time
environment.  For example, Plone 2.1 and Zope 2.8 require Python 2.3,
but the Plone port (which defines USE_ZOPE) depends on and builds
against Python 2.4.  This can cause compatibility problems, e.g. when
Zope (Python 2.3) tries to load Plone's byte-compiled files (Python
2.4).
>How-To-Repeat:
1. Install ports/www/zope28.  This will install ports/lang/python23
   automatically.

2. Add the following lines to /etc/make.conf:

    PYTHON_VERSION=python2.3
    ZOPE_VERSION=2.8

3. Install ports/www/plone.  Note that this causes ports/lang/python
   (Python 2.4) to install.  Note also that Plone will build against
   Python 2.4.
>Fix:
I don't know if this is the correct fix, but the following changes to
ports/Mk/bsd.python.mk work for me.  Someone who is more familiar with
the ports tree's make scripts should review these changes before
committing them.  With these changes, if PYTHON_VERSION is already
set, bsd.python.mk will not override it.

--- ports/Mk/bsd.python.mk.orig Mon Apr 10 08:18:51 2006
+++ ports/Mk/bsd.python.mk      Mon Apr 10 08:14:47 2006
@@ -204,9 +204,9 @@
 ZOPE_VERSION?= ${_ZOPE_VERSION}

 .if ${ZOPE_VERSION} == "2.7"
-PYTHON_VERSION=         python2.3
+PYTHON_VERSION?=         python2.3
 .else
-PYTHON_VERSION=         python2.4
+PYTHON_VERSION?=         python2.4
 .endif
 .endif # defined(USE_ZOPE)


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->perky 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Apr 11 05:03:56 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=95584 

From: "Matthew X. Economou" <xenophon@irtnog.org>
To: <bug-followup@FreeBSD.org>,
	"Matthew X. Economou \(email aliases\)" <xf@irtnog.org>
Cc:  
Subject: Re: ports/95584: [patch] bsd.python.mk: A port's "USE_ZOPE=yes" overrides PYTHON_VERSION if set by the package builder
Date: Tue, 9 May 2006 07:15:19 -0400

 Upon further reflection, a better fix might be to set PYTHON_VERSION to
 "python2.3" for Zope versions 2.7 and 2.8, given the recommendations on
 the Zope 2.8 release pages:
 
 http://zope.org/Products/Zope/2.8.6/Zope-2_8_6-released
 
 With this in mind (yet still wanting the system administrator to be able
 to override me), I'd like to submit a revised version of the patch:
 
 --- ports/Mk/bsd.python.mk.orig Mon Apr 10 08:18:51 2006
 +++ ports/Mk/bsd.python.mk      Tue Apr 11 20:01:00 2006
 @@ -203,10 +203,10 @@
 
  ZOPE_VERSION?=3D ${_ZOPE_VERSION}
 
 -.if ${ZOPE_VERSION} =3D=3D "2.7"
 -PYTHON_VERSION=3D         python2.3
 +.if ${ZOPE_VERSION} =3D=3D "2.7" || ${ZOPE_VERSION} =3D=3D "2.8"
 +PYTHON_VERSION?=3D         python2.3
  .else
 -PYTHON_VERSION=3D         python2.4
 +PYTHON_VERSION?=3D         python2.4
  .endif
  .endif # defined(USE_ZOPE)
 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Tue Jul 25 00:30:05 UTC 2006 
State-Changed-Why:  
perky: do you have any reaction to this one? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=95584 
State-Changed-From-To: feedback->closed 
State-Changed-By: miwi 
State-Changed-When: Thu Aug 14 23:16:00 UTC 2008 
State-Changed-Why:  
Feedback timeout. If this problem still exists, please feel free to 
follow-up this PR so that we can re-open it and find a solution for the 
problem. Thanks! 


http://www.freebsd.org/cgi/query-pr.cgi?pr=95584 
>Unformatted:
