On Sun, Jan 26, 2003 at 12:50:36PM +0000, Matt wrote:

> I am currently running freebsd 5.0-current and so do not have the perl 
> installation as core. Perl 5.6.1 was installed as a dependency when I 
> installed irssi from ports and everything has been using this since. I 
> assume because this is the version mentioned in /etc/make.conf:
> PERL_VER=5.6.1
> PERL_ARCH=mach
> NO_PERL=yo
> What I would like to do is remove the perl 5.6.1 port and install the perl 
> 5.8 port instead but before I go off and try this and break lots of things I 
> would like to know what I need to do to change all my currently installed 
> ports that have been installed to depend on perl 5.6.1 and the modules 
> in /usr/local/lib/perl5/site_perl/5.6.1/ so that they all work in 5.8.
> Is it just a case of backing up site_perl and forcing a deinstall of the 
> 5.6.1 port and installing the 5.8 port and copying all the site_perl stuff 
> back but under /usr/local/lib/perl5/site_perl/5.8 instead? Or am I going to 
> need to reinstall all the ports that depend on perl? Plus I guess changing 
> the /etc/make.conf to 5.8 (though I guess the port will do this). Also am I 
> right to assume that the ports use the config in make.conf to decide which 
> version of perl they depend on?

Probably the best way to do this is as follows:

    0) Get a good backup of everything.  Install portupgrade.

    i) Make a list of all of the perl modules you've installed and
    check that they all depend on perl-5.6.1. Seeing as you're on 5.0
    and so using a ports version of perl rather than the version
    bundled with 4.x, you should see an explicit dependency on
    perl-5.6.1. You should therefore find most perl dependent things
    by doing:

        pkg_info -r perl-\*

    If you're on 4.x and using the system perl, you'll have to go
    about finding the dependencies by other means.  Eg. by:

        pkg_info -I p5-\*

    but beware of the oddities like MRTG or rrdtool that don't match
    that naming convention.

    Similarly make a list of any perl modules you've installed via
    CPAN.  (The 'snapshot' command in a CPAN shell will give you more
    than enough information for that purpose.) Ideally at the end of
    this job you should be able to identify all packages that have
    installed files under /usr/local/lib/perl5/{5.6.1,site_perl/5.6.1}
    --- it's those packages which will have to be re-installed to use
    the new perl.

    ii) Install the perl-5.8.0 port side-by-side with the perl-5.6.1
    port, and run the 'use.perl port' command from 5.8.0.  That should
    mean that:


    appears in /etc/make.conf --- you can delete any old use.perl
    stuff pointing at perl-5.6.1

    iii) Re-install all of the ports that installed files into a
    perl-5.6.1 specific directory.  You won't need to reinstall a port
    just because it gets its perl dependency just by containing some
    perl scripts, but you do need to re-install anything that installs
    .pm files or shared modules.  If you're unsure, reinstall it.  The
    easiest way to do this job is by using portupgrade(1):

        portupgrade -rNfix perl-5.6.1 perl-5.6.1

    and select 'y' or 'n' as it prompts you to upgrade each port.  The
    re-installed ports should now depend on perl-5.8.0.

    iv) Similarly, re-install any perl modules downloaded from CPAN.
    Nb. if possible use the ports version of a module in preference to
    the CPAN version --- even with BSDPAN, it's still easier to manage
    FreeBSD ports/pkgs.

    v) Forcibly remove the old perl-5.6.1 port:

        pkg_deinstall -f perl-5.6.1\*

    You've probably got some ports that are still listed as depending
    on perl-5.6.1, which you can interactively fix to depend on
    perl-5.8.0 by running:

        pkgdb -Fvu

    vi) Test thoroughly.  Clean up any remnant perl-5.6.1 directories
    under /usr/local/lib/perl5, and make sure that /etc/manpath.config
    references the right perl man directory.

That should get you up and running with 5.8.0.  



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to