perl version woe

Victor Sudakov vas at mpeks.tomsk.su
Thu Apr 16 08:08:02 UTC 2015


Matthew Seaman wrote:
> On 16/04/2015 05:27, Victor Sudakov wrote:
> > I have changed the origin of the perl package with 
> > "pkg set -o lang/perl5.16:lang/perl5.18", so now it's
> > 
> > [root at gw ~] pkg info -xo perl
> > perl5.16-5.16.3_20             lang/perl5.18
> > 
> > Why does pkg still suggest installing perl5 while I already have it?
> 
> Because the packaging system recently (ie. in the last several months)
> changed from using the port origin to using the port /name/ as the
> unique key in the package database. 'pkg set -o' now has an equivalent
> 'pkg set -n' to switch the name of a dependency.  Which is as yet
> completely undocumented in pkg-set(8)...

Which means, instead of "pkg set -o" I should now say what?

> 
> Also, with recent versions of pkg, all this faffing about with 'pkg set'
> is completely unnecessary.  If you want to switch to a different version
> of perl, point your pkg(8) at a repo built with the version of perl you
> want and upgrade.  It's as easy as that.

I am an old FreeBSD fan, admin since 2.1.7, and user since 1.1.5.1. I
am afraid, and for a good reason.

I fear that if I just run "pkg upgrade" now, I will end up with two
perls one of which is a phantom package, and will have to manually
cleanup or reinstall everything. I have already found myself in such a
fix more than once.

> 
> If you're using portmaster or similar, you'll need to do something more
> involved, but it will boil down to setting the default version for perl
> in your /etc/make.conf and then reinstalling anything that puts compiled
> object files somewhere under ${LOCALBASE}/lib/perl5 (ie. perl-XS stuff,
> but not pure perl code.)

In fact, I have adopted a system which has been kept fairly recent
with portmaster (but they kept perl5.16 during portmaster runs, there
was an +IGNOREME file).

Now I want to switch this system to my own repository, which currently
has perl 5.18 as a default.

Do you mean to say, I should be able to safely run "pkg upgrade" and
pkg will resolve this for me?

I'd better try on a copy of the system.


-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov at sibptus.tomsk.ru


More information about the freebsd-pkg mailing list