Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jul 2009 13:59:58 +0000
From:      "b. f." <>
Cc:        manish jain <>
Subject:   Re: Urgent help needed : portmaster dies on py-cairo
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On 7/6/09, manish jain <> wrote:
> 2009/7/6 b. f. <>

> After running pkgdb -F, I find that there hundreds of ports depending on
> python2.5.

Most of these are probably indirectly dependent, and may not be
seriously affected.  Many, for example, may have been dragged in by
xorg's silly dependency on python via libxcb.

>Looks to me it will be easier to backup my dstfiles and reinstall
> the whole system afresh a 3rd time rather than trying to fix the existing
> ports. This time I will install no packages from the installation media, and
> build directly from ports instead. The first 2 ports I will build this time
> will be lang/python26 followed by lang/python.

Sounds good.

> I suppose this should set the
> systemwide default python version to 2.6.

As the others have mentioned, you don't need to do this unless you
wish to use a version of python other than 2.6, which is now the

> 1) How do I find or set  PYTHON_DEFAULT_VERSION ?
> 2) What workaround would be needed in make.conf to get 2.5-hardwired ports
> to use 2.6 instead ?

1) See above.
2) I didn't mean, as Seaman seemed to think, and you may have, that
you can use ports built against 2.5 with 2.6.  That would only rarely
work, and most likely lead to all sorts of problems. Instead you
should proceed with your plan, and rebuild all dependent ports via:

pkgdb -L
pkgdb -F
portupgrade -fvrx lang/python26 lang/python26
rm -r /usr/local/lib/python2.5

or rebuild just that subset of ports that are most likely to be broken
by the change, via the upgrade-site-packages target in lang/python, as
Seaman suggested.

What I meant by my original comment was, that if you should happen to
want to build a port against 2.6, but find that it is hardwired in the
port Makefile via USE_PYTHON to another version or versions, and you
don't want to go to the trouble of patching the port Makefile, and
then preserving this local modification when you merge in updates to
the port tree, you can add a workaround in /etc/make.conf.  Say, for
example, you see that mail/py-spambayes has:

USE_PYTHON=     -2.5

in the port Makefile, and you want to install spambayes, but you don't
want to have to reinstall python 2.5 or an earlier version of python.
If you add:


to /etc/make.conf, you can override the spambayes port Makefile
without patching it.  Now, you are _not_ supposed to do this, and you
will probably have to deal with any consequences of such a local
change on your own.  Many ports have these restrictions for a good
reason, but such an override can be occasionally useful.


Want to link to this message? Use this URL: <>