samizdat has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, wise and patient Monks and Monkettes -

While doing portupgrade --all on my FreeBSD-STABLE system, I notice that it has no capability to handle Perl modules installed through the BSDPAN interface. Perl was successfully upgraded from 5.8.6 to 5.8.7 by the script, but all of the modules were 'held by owner' and skipped.

What is the proper procedure for handling this, short of pkg_delete p5-* and reinstalling each Perl module individually?

Don Wilde
"There's more than one level to any answer."

Replies are listed 'Best First'.
Re: Updating modules when updating Perl on BSD
by grinder (Bishop) on Jan 10, 2006 at 16:57 UTC

    I don't know if this is the proper way, but rather than brutally deleting everything, just tell portupgrade to upgrade the p5-* packages explicitly:

    pkg_version -l\< | grep ^p5- | xargs portupgrade

    Some packages will still be held back. In that case, use the -f switch to force the upgrade. You might want to save the results of the above pipe just after the grep to a file, and give it a look over before handing it off to portupgrade.

    This seems to work well for me, but to tell the truth I've never exactly understood the relationship between ports and bdspan.

    • another intruder with the mooring in the heart of the Perl

      Ohhh, trick. /me studies man pkg_version intently to grok the wisdom! {/me doesn't understand BSDPAN at all well either, though!}

      Don Wilde
      "There's more than one level to any answer."
Re: Updating modules when updating Perl on BSD
by parv (Parson) on Jan 12, 2006 at 03:15 UTC

    In /usr/ports/UPDATING, entry "20050201" lists a way to upgrade some of the Perl software ...

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

    ... and adds that above "is likely to fail for a few ports, you'll have to upgrade them afterwards by hand". See also the "20050624" entry which mentions perl-after-upgrade, installed w/ Perl 5.8.7 port.

      Good pointers, parv, thanks! I'd forgotten the UPDATING file in /usr/ports, just looked in the one in /usr/src.

      One of the problems I have here at SNL is the firewalls, which kill make test's on things like HTTP::SimpleLinkChecker which just assume that you have (unfettered) Internet access.

      Still, though, I have to step back and appreciate how much really does get done automatically by CPANPLUS and portupgrade and cvsup and make... Things could be a LOT worse... :D

      Don Wilde
      "There's more than one level to any answer."