when trying to install perl5.8 /alongside/ perl5.6.1 (freebsd 5.0 default), the ports version tries to (and does) overwrite the 5.6.1 install.
This in itself is bad enough. However, problems just start.
It DOES leave the perl5.6.1 binary in place. Oh, no, wait, it's a symlink to /usr/local/bin/perl. which after the upgrade, is ACTUALLY perl5.8. so you get this situation:
[root@fs ...local/bin]$ ./perl5.6.1 -v
This is perl, v5.8.0 built for i386-freebsd
from the ls -alg, it's clear why this happens:
-rwxr-xr-x 1 root wheel 856592 perl*
lrwxr-xr-x 1 root wheel 19 perl5@ -> /usr/local/bin/perl
lrwxr-xr-x 1 root wheel 19 perl5.6.1@ -> /usr/local/bin/perl
lrwxr-xr-x 1 root wheel 19 perl5.8.0@ -> /usr/local/bin/perl
This is a bad thing!
now, when trying to install a module, say Curses via /usr/ports, the following fun happens:
===> Installing for p5-Curses-1.05
===> p5-Curses-1.05 depends on file: /usr/local/bin/perl5.6.1 - found
Files found in blib/arch: installing files in blib/lib into architecture depende
nt library tree
Appending installation info to /usr/local/lib/perl5/5.8.0/mach/perllocal.pod
===> Generating temporary packing list
===> Compressing manual pages for p5-Curses-1.05
/usr/local/lib/perl5/5.6.1/man//man3/Curses.3: No such file or directory
===> Registering installation for p5-Curses-1.05
note how it just installed itself under the 5.8 tree.
my first reactions was: 'f*ck, don't do that!' and hit 'make deinstall' - which barfes even worse:
[root@fs ...devel/p5-Curses]$ make deinstall
===> Deinstalling for p5-Curses-1.05
pkg_delete: file '/usr/local/lib/perl5/5.6.1/man/man3/Curses.3.gz' doesn't really exist
pkg_delete: file '/usr/local/lib/perl5/site_perl/5.6.1/mach/Curses.pm' doesn't r
pkg_delete: file '/usr/local/lib/perl5/site_perl/5.6.1/mach/auto/Curses/Curses.b
s' doesn't really exist
pkg_delete: file '/usr/local/lib/perl5/site_perl/5.6.1/mach/auto/Curses/Curses.s
o' doesn't really exist
pkg_delete: file '/usr/local/lib/perl5/site_perl/5.6.1/mach/auto/Curses/.packlis
t' doesn't really exist
pkg_delete: file '/usr/local/lib/perl5/site_perl/5.6.1/mach/auto/Curses' doesn't
pkg_delete: unable to completely remove directory '/usr/local/lib/perl5/site_per
pkg_delete: couldn't entirely delete package (perhaps the packing list is
The true problem here is the fact that 5.8 overwrites 5.6.1 in a very sloppy manner. Ideally, 5.8 lives in /usr/local/bin and 5.6.1 in /usr/bin (rather than symlinking /usr/bin/perl to /usr/local/bin/perl).
However, one should never symlink '/usr/local/bin/perl5.6.1' to 'perl', but rather the other way around. This ensures that even if you overwrite your perl binary, you really only changed the symlink, and a perl5.6.1 still EXISTS on your system. (problems /will/ occurs with supporting program such as perldoc and perlcc~)
If these changes are too 'drastic', the LEAST the portinstall for 5.8 should do is REMOVE the 5.6.1 symlink, since then people (and programs!) at least wouldn't think there /is/ a 5.6.1 still on the system
How-To-Repeat: vanilla freebsd5.0 install
I'll take this one.
Oops -- fat-fingered the PR number.
This issue is fixed in the recent update of lang/perl5 and lang/perl5.8.