From owner-cvs-ports@FreeBSD.ORG Tue Jun 9 18:00:21 2009 Return-Path: Delivered-To: cvs-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77DB8106568F; Tue, 9 Jun 2009 18:00:21 +0000 (UTC) (envelope-from wxs@atarininja.org) Received: from syn.atarininja.org (syn.csh.rit.edu [129.21.60.158]) by mx1.freebsd.org (Postfix) with ESMTP id 29F208FC29; Tue, 9 Jun 2009 18:00:21 +0000 (UTC) (envelope-from wxs@atarininja.org) Received: by syn.atarininja.org (Postfix, from userid 1001) id 6838D5C40; Tue, 9 Jun 2009 14:00:20 -0400 (EDT) Date: Tue, 9 Jun 2009 14:00:20 -0400 From: Wesley Shields To: Doug Barton Message-ID: <20090609180020.GA40405@atarininja.org> References: <200906091346.n59Dk3vj093458@repoman.freebsd.org> <4A2EA0A1.6010607@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="J/dobhs11T7y2rNN" Content-Disposition: inline In-Reply-To: <4A2EA0A1.6010607@FreeBSD.org> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports UPDATING X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 18:00:24 -0000 --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 09, 2009 at 10:49:21AM -0700, Doug Barton wrote: > Wesley Shields wrote: > > wxs 2009-06-09 13:46:03 UTC > > > > FreeBSD ports repository > > > > Modified files: > > . UPDATING > > Log: > > - Remove portmaster instructions for python update as they do not work. > > I am working on a fix to the upgrade-site-packages target to support > > using portmaster. > > If you need any help just let me know. The problem was not with portmaster, but was with the reliance on pkg_which. The attached patch should fit it. I currently have sent it to itetcu and miwi for review. The biggest downside is that pkg_info can not take multiple arguments on the command line like pkg_which does, so we have to use xargs -L 1, which makes things slow compared to using pkg_which. If anyone wants to test it out please feel free to do so: cd /usr/ports/lang/python && make upgrade-site-packages -DUSE_PORTMASTER But be warned that I have only tested it on one machine so I'm not responsible if it lights your cat on fire or other bad things. -- WXS --J/dobhs11T7y2rNN Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="python26-portmaster.diff" Index: Makefile =================================================================== RCS file: /ncvs/ports/lang/python/Makefile,v retrieving revision 1.161 diff -u -r1.161 Makefile --- Makefile 31 Jul 2007 16:28:32 -0000 1.161 +++ Makefile 9 Jun 2009 15:43:57 -0000 @@ -24,8 +24,17 @@ @${DO_NADA} # Major upgrade support -PORTUPGRADE_CMD?= ${LOCALBASE}/sbin/portupgrade -PKG_WHICH_CMD?= ${LOCALBASE}/sbin/pkg_which +PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade +PKG_WHICH_CMD= ${LOCALBASE}/sbin/pkg_which +XARGS_CMD= ${XARGS} -0 + +.if defined(USE_PORTMASTER) +PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster +PORTUPGRADE_ARGS= "" +PKG_WHICH_CMD= /usr/sbin/pkg_info -qW +XARGS_CMD= ${XARGS} -L 1 -0 +.endif + upgrade-site-packages: @if [ ! -x ${PORTUPGRADE_CMD} ]; then \ ${ECHO_MSG} "Please install ports-mgmt/portupgrade."; \ @@ -36,7 +45,7 @@ if [ -d ${PREFIX}/lib/python$$ver ]; then \ UPD=`${FIND} ${PREFIX}/lib/python$$ver \ -type f -print0 | \ - ${XARGS} -0 ${PKG_WHICH_CMD} | \ + ${XARGS_CMD} ${PKG_WHICH_CMD} | \ ${GREP} -Fv '?' | \ ${EGREP} -v '^python2?[0-5]?-2' | \ ${SORT} -u`; \ --J/dobhs11T7y2rNN--