Date: Tue, 9 Jun 2009 14:00:20 -0400 From: Wesley Shields <wxs@FreeBSD.org> To: Doug Barton <dougb@FreeBSD.org> Cc: cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports UPDATING Message-ID: <20090609180020.GA40405@atarininja.org> In-Reply-To: <4A2EA0A1.6010607@FreeBSD.org> References: <200906091346.n59Dk3vj093458@repoman.freebsd.org> <4A2EA0A1.6010607@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
[-- Attachment #2 --]
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`; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090609180020.GA40405>
