From owner-freebsd-python@FreeBSD.ORG Wed May 27 22:04:00 2009 Return-Path: Delivered-To: python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A489A1065688 for ; Wed, 27 May 2009 22:04:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 49D6C8FC31 for ; Wed, 27 May 2009 22:04:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 20400 invoked by uid 399); 27 May 2009 22:03:49 -0000 Received: from localhost (HELO ?192.168.0.101?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 27 May 2009 22:03:49 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A1DB8C3.5030202@FreeBSD.org> Date: Wed, 27 May 2009 15:03:47 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Wesley Shields References: <20090517165416.GW71804@bsdcrew.de> <4f615770905262030r71075f5bmc1bc41417d878313@mail.gmail.com> <4A1D7F2D.5010803@FreeBSD.org> <20090527212727.GA37748@atarininja.org> In-Reply-To: <20090527212727.GA37748@atarininja.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: perky@freebsd.org, Martin Wilke , tmclaugh@freebsd.org, ports@freebsd.org, python@freebsd.org, clsung@frebsd.org, lwhsu@freebsd.org Subject: Re: [CFT] FreeBSD python25 move to python26 as default version. X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 22:04:01 -0000 Wesley Shields wrote: > On Wed, May 27, 2009 at 10:58:05AM -0700, Doug Barton wrote: >> Kelly Hays wrote: >>> On Sun, May 17, 2009 at 11:54 AM, Martin Wilke wrote: >>>> Once the installed Python has been updated to 2.6, by using one of the >>>> methods above, it is required to run the upgrade-site-packages target in >>>> lang/python to assure that site-packages are made available to the new Python >>>> version. >>>> >>>> # cd /usr/ports/lang/python && make upgrade-site-packages >>>> >>>> This Makefile target requires ports-mgmt/portupgrade to be installed. >>>> >>> A lot of us are no longer using ports-mgmt/portupgrade in favor of >>> ports-mgmt/portmaster. Please support both tools. >> First, I don't use python, so I'm not directly affected by this. >> Second, I don't think it's reasonable to _require_ that a user needs >> to use any additional tools (such as portupgrade or portmaster) to do >> something with the ports system. I do think it's reasonable to provide >> instructions such as, "If you use toolA, do X, for toolB do Y, and if >> you don't use a tool do Z, etc." >> >> That said, if someone can explain what it is that needs to be done, I >> will be glad to help write instructions for doing it with portmaster. > > At first glance it looks like pkg_which can be replaced with > 'pkg_info -W' (the grep stuff may have to be changed, I haven't looked > into it) and the portupgrade piece can be replaced with the > equivalent in portmaster. There could be an > upgrade-site-packages-portmaster target or the equivalent instructions > can be added to UPDATING. Thanks for taking a look at this. I tend to agree with you that it should be easy to replace. For that matter, it should even be possible to replace the portupgrade piece with 'make -DFORCE_PKG_REGISTER' but I certainly wouldn't deny people who use the various maintenance tools the opportunity to use them. FWIW, portmaster does the equivalent of 'portupgrade -f' by default, so the equivalent in the code below would simply be: ${PORTMASTER_CMD} $$UPD; hope this helps, Doug > # Major upgrade support > PORTUPGRADE_CMD?= ${LOCALBASE}/sbin/portupgrade > PKG_WHICH_CMD?= ${LOCALBASE}/sbin/pkg_which > upgrade-site-packages: > @if [ ! -x ${PORTUPGRADE_CMD} ]; then \ > ${ECHO_MSG} "Please install ports-mgmt/portupgrade."; \ > ${FALSE}; \ > fi > > @for ver in `echo ${_PYTHON_ALLBRANCHES}|${SED} 's/${PYTHON_VER}//'`; do \ > if [ -d ${PREFIX}/lib/python$$ver ]; then \ > UPD=`${FIND} ${PREFIX}/lib/python$$ver \ > -type f -print0 | \ > ${XARGS} -0 ${PKG_WHICH_CMD} | \ > ${GREP} -Fv '?' | \ > ${EGREP} -v '^python2?[0-5]?-2' | \ > ${SORT} -u`; \ > if [ "$$UPD" ]; then \ > ${PORTUPGRADE_CMD} -f $$UPD; \ > fi; \ > fi; \ > done \ > > -- WXS > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" >