Skip site navigation (1)Skip section navigation (2)
Date:      22 Apr 2003 13:12:04 -0000
From:      "Jos I.Boumans" <kane@dwim.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        kane@dwim.org
Subject:    ports/51281: broken way of upgrading perl5.6.x to 5.8 via /usr/ports
Message-ID:  <20030422131204.72858.qmail@perl.xs4all.nl>
Resent-Message-ID: <200304221310.h3MDADJU089486@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         51281
>Category:       ports
>Synopsis:       broken way of upgrading perl5.6.x to 5.8 via /usr/ports
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 22 06:10:12 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jos I. Boumans
>Release:        FreeBSD 5.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD fs.domaintje.com 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Thu Jan 16 22:16:53 GMT 2003 root@hollin.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386


>Description:
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
l/5.6.1/mach/auto/Curses'
pkg_delete: couldn't entirely delete package (perhaps the packing list is
incorrectly specified?)


>How-To-Repeat:
	vanilla freebsd5.0 install
	portinstall perl5.8
	portinstall p5-Curses
	
>Fix:

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

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030422131204.72858.qmail>