b. f. wrote:
On 7/6/09, manish jain <invalid.poin...@gmail.com> wrote:
2009/7/6 b. f. <bf1...@googlemail.com>

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
default.


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:

.if${.CURDIR:M*/mail/py-spambayes*}
PYTHON_VERSION=python2.6
NO_IGNORE=yes
.endif

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.

b.


Hi,

After a marathon session spread over 2 days, I have managed to set up a new FreeBSD-7.2 installation with all ports (762) up to date. From the gleanings of this conversation and some reading I did myself, I have compiled a small document for what-to-do-after-installation. I would dearly appreciate your comments on the document, and would be extremely glad if my document could be of any help to somebody else too.

Please note that portupgrade works much better on my system than portmaster. So the following document assumes/recommends using portupgrade.

Here it is.

==============================================
Part-1)    Immediately after a fresh FreeBSD-7.2#RELEASE install :

I assume you will at some stage or the other install a linux port, eg acroread8 or acroread9, linux-ymessenger, etc. Incidentally, unless you have specific needs, prefer acroread8 over acroread9.

All following steps are to be executed as root.

a)    Make sure /etc/rc.conf has at least the following 5 lines.
dbus_enable="YES"
hald_enable="YES"
polkitd_enable="YES"
gnome_enable="YES"
linux_enable="YES"

b)    Make sure /boot/loader.conf has at least the following 3 lines.
kern.maxdsiz="734003200"
linprocfs_load="YES"
linsysfs_load="YES"

c)    Make sure /etc/fstab has at least the following 3 lines.
proc /proc procfs rw 0 0
linproc     /usr/compat/linux/proc        linprocfs    rw        0        0
linsys /usr/compat/linux/sys linsysfs rw 0 0

d) Upgrage from python25 to python26 along with all dependent ports as follows :

rm -rf /usr/ports 2>/dev/null
mkdir -p /usr/ports/distfiles
portsnap fetch extract
cd  /usr/ports/ports-mgmt/portupgrade
make deinstall  2>/dev/null
make install clean
portupgrade -C -r -o  lang/python26  lang/python25
portupgrade -rfx python26 python26
pkgdb -F

Before doing anything further, reboot. Immediately after reboot, execute Part-2.


Part-2) Steps to be followed whenever a significant number new ports/patches are available and you need to ensure your ports as well as your ports directory are up to date :

thisdate=`date "+%Y-%m-%n"`
rm  /root/portupgrade-${thisdate}.log 2>/dev/null
portsnap fetch update
portupgrade -ace -uRl  /root/portupgrade-${thisdate}.log
pkgdb -F

Note : If you plan to install any linux ports, you should have said yes to 'Linux binary compatibility' at the time you installed FreeBSD. If you didn't, the very first port you need to build is emulators/linux_base-fc4
==============================================


I look forward to your comments and suggestions.

Regards
Manish Jain
invalid.poin...@gmail.com

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to