Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jun 2004 14:51:24 -0500
From:      Jon Noack <noackjr@alumni.rice.edu>
To:        Ivan Voras <ivoras@fer.hr>
Cc:        current@freebsd.org
Subject:   Re: Upgrading perl
Message-ID:  <40CE01BC.5060608@alumni.rice.edu>
In-Reply-To: <40CDC77A.8090300@fer.hr>
References:  <40CDC77A.8090300@fer.hr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06/14/04 10:42, Ivan Voras wrote:
> The situation is: running 4-stable, with perl 5.6 from ports, with lots 
> of packages which depend on it. Now I need to install an application 
> that requires perl5.8!
> 
> Is there a way to switch over to 5.8 without breaking everything? I'm 
> asking this because I see two different ports in the tree: perl5, which 
> installs 5.6 and perl5.8 which apparently has what I need, but 
> portupgrade doesn't understand it (tries to upgrade 5.6 to a newer port 
> revision).
> 
> I tried installing the perl5.8 port (which gets me three versions of 
> perl installed, *sigh*), but existing applications couldn't find needed 
> modules.

To upgrade from 5.6.x to 5.8.x (with no 5.8.x installed):
'portupgrade -o lang/perl5.8 lang/perl'

As mentioned previously, be sure to follow the directions in 
/usr/ports/UPDATING.  You may need to change the upgrade command 
slightly to reflect you're coming from 5.6.x instead of an earlier 
version of 5.8.x (change the 5.8.2 to 5.6.1 as below):

portupgrade -f `(pkg_info -R perl-5.8.4 |tail +4; \
   find /usr/local/lib/perl5/site_perl/5.6.1 -type f -print0 \
     | xargs -0 pkg_which -fv | sed -e '/: ?/d' -e 's/.*: //')|sort -u`

After rebuilding everything, you may want to finalize the upgrade by 
cleaning out /usr/local/lib/perl5/ and /usr/local/lib/perl5/site_perl. 
Due to incorrect plists, there may be some files left there from 5.6.x. 
  It might be a good idea to check that each file is present in the 
5.8.x directory before deleting (as a sanity check for the upgrade), but 
after the complete rebuild it should be safe to remove everything.  The 
goal is to completely get rid of the 5.6.x directories:

$ ls /usr/local/lib/perl5/
5.8.4           site_perl
$ ls /usr/local/lib/perl5/site_perl/
5.8.4

I've not had any problems with this method (used on many machines 
running 4.10, 5.2.1, and -CURRENT), but it's best practice to have a 
full backup before the upgrade as it touches on a huge chunk of the 
system...

Jon Noack



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