[CFT] FreeBSD python25 move to python26 as default version.
Wesley Shields
wxs at FreeBSD.org
Wed May 27 21:44:15 UTC 2009
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 <miwi at freebsd.org> 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.
# 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
More information about the freebsd-python
mailing list