The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Upgrading Perl
Author: Dan 
Date:   28-08-04 10:45

I was on Perl 5.6.1 and wanted to try Perl 5.8. Here's what I did, based on help from Mathieu Arnold:

portupgrade -o lang/perl5.8 perl-5.6.1

This tells portupgrade to update perl-5.6.1 taking lang/perl5.8 as the origin. It replaces the old perl with the new.

Then you *must* run use.perl port to tell your system that you have a new perl installed

Then you need to upgrade all the perl modules you have installed (PLEASE read the note after this before running):

portupgrade -f $(find /usr/local/lib/perl5/site_perl/5.6.1 -type f -print0|xargs -0 pkg_which -fv|sed -e 's/.*: //g'|sort -u)

[Mat says he uses $(...) because he uses bash. If you use csh, try `...` instead.]

Mat also said: If you're wondering why not just portupgrade -f p5-*, do a find /usr/local/lib/perl5/site_perl/5.6.1 -type f -print0|xargs -0 pkg_which -fv|sed -e 's/.*: //g'|sort -u|grep -v ^p5-

and you'll see for yourself what else is there. In short, there is more than just p5-* ports depend upon perl.

NOTE: You should read /usr/ports/UPDATING where it contains a section on how to upgrade perl. Here is an extract:

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

This is likely to fail for a few ports, you'll have to upgrade them afterwards.

--
Webmaster

Post Edited (28-08-04 04:03)

Reply To This Message
 
 Re: Upgrading Perl
Author: Erin 
Date:   31-08-04 04:09

I just did this about a week ago... after a full backup. It was still stressfull testing all my scripts afterwards to make sure everything worked and hoping I did not have to go backwards. I am running 4.9R with Cyrus-imapd, postfix and a whole host of custom perl scripts.

-Erin

Reply To This Message
 
 Re: Upgrading Perl
Author: Dan 
Date:   31-08-04 15:45

So did your upgrade work?

--
Webmaster

Reply To This Message
 
 Re: Upgrading Perl
Author: Erin 
Date:   01-09-04 21:34

Sorry, I should have posted that...

Yes it did.

I did have to do a "portupgrade -f" on at least two ports. I do not remember which ones they were right now.


-Erin

Reply To This Message
 
 Re: Upgrading Perl
Author: Dan 
Date:   30-11-04 15:37

This worked better lately:

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

--
Webmaster

Reply To This Message
 
 Re: Upgrading Perl
Author: Dan 
Date:   27-02-05 18:39

Dan wrote:

> NOTE: You should read /usr/ports/UPDATING where it contains a
> section on how to upgrade perl. Here is an extract:

Yes. I recommend using /usr/ports/UPDATING instead of the above.

--
Webmaster

Reply To This Message
 
 Re: Upgrading Perl
Author: Dan 
Date:   27-02-05 19:36

This is also a useful tool:

http://people.freebsd.org/~tobez/

--
Webmaster

Reply To This Message
 
 Re: Upgrading Perl
Author: tools_10 
Date:   10-03-05 15:07

THANKS for the info
i am new to freeBSD system and how it works
i have been a windows system administor for 15 years and at my new job
we use free BSD system on the servers and this is the BEST places to find INFO on HOW TOs ONE BIG THANKS To ALL



tools_10

Reply To This Message
 
 Re: Upgrading Perl
Author: Erin 
Date:   20-03-05 19:00

It seems that with 5.3R, every port has something to do with Perl. When I updated Perl the last few times, EVERY port on the system had to be updated. With some systems, this is fine (my main web server is an HT3.4 w/ 3G RAM), but other it can take most of the day (Church's 1G Celeron w/ 256M RAM).

Just be careful, this can take a long time.


-Erin

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org