Bug 51281 - lang/perl5: broken way of upgrading perl5.6.x to 5.8 via /usr/ports
Summary: lang/perl5: broken way of upgrading perl5.6.x to 5.8 via /usr/ports
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Anton Berezin
Depends on:
Reported: 2003-04-22 14:10 UTC by Jos I.Boumans
Modified: 2005-02-02 09:47 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jos I.Boumans 2003-04-22 14:10:12 UTC
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
Installing /usr/local/lib/perl5/site_perl/5.8.0/mach/auto/Curses/Curses.so
Installing /usr/local/lib/perl5/site_perl/5.8.0/mach/auto/Curses/Curses.bs
Files found in blib/arch: installing files in blib/lib into architecture depende
nt library tree
Installing /usr/local/lib/perl5/site_perl/5.8.0/mach/Curses.pm
Installing /usr/local/lib/perl5/5.8.0/man/man3/Curses.3
Writing /usr/local/lib/perl5/site_perl/5.8.0/mach/auto/Curses/.packlist
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
eally exist
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
 really exist
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
incorrectly specified?)


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
	portinstall perl5.8
	portinstall p5-Curses
Comment 1 Anton Berezin freebsd_committer 2003-04-22 14:13:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->tobez

I'll take this one.
Comment 2 Pete Fritchman freebsd_committer 2003-05-10 20:00:09 UTC
State Changed
From-To: open->closed

Committed, thanks.
Comment 3 Pete Fritchman freebsd_committer 2003-05-10 20:40:36 UTC
State Changed
From-To: closed->open

Oops -- fat-fingered the PR number.
Comment 4 Sergey Matveychuk 2003-12-23 22:16:50 UTC

Comment 5 Anton Berezin freebsd_committer 2005-02-02 09:46:31 UTC
State Changed
From-To: open->closed

This issue is fixed in the recent update of lang/perl5 and lang/perl5.8.