メンテナンス・トラブルシュート - pkg・ports アップデート - perl5 - perl5.20 → perl5.24

クラウディア 
1. 概要
2. バージョンアップ
3. /etc/make.conf 編集

1. 概要

 いつものように、ports の更新をやっていて vim に更新があったので更新しようとしましたらば

$ portupgrade -rR vim
[Reading data from pkg(8) ... - 374 packages found - done]
** Port marked as IGNORE: editors/vim:
        Invalid perl5 version 5.20
[Exclude up-to-date packages  done]
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        - editors/vim (marked as IGNORE)
 ちと焦りましたが「Invalid perl5 version 5.20」っていうのが問題なんですな。  ディレクトリを見てみましたらば

$ cd /usr/ports/lang/
$ ls -d perl*
perl5-devel perl5.22    perl5.24    perl5.26
 おや、perl5.20 がなくなっておるではないか。  作業しているマシンは perl5.20 なのだ。  一応、pkg も確認してみます。

$ pkg version -v | grep perl
perl5-5.20.3_16                    ?   orphaned: lang/perl5.20
 くどくなりますが、「/usr/ports/UPDATING」も見てみます。

20161103:
  AFFECTS: users of lang/perl5*
  AUTHOR: mat@FreeBSD.org

  The default Perl version has been switched to Perl 5.24.  If you are using
  binary packages to upgrade your system, you do not have anything to do, pkg
  upgrade will do the right thing.  For the other people, assuming you are
  migrating from 5.20 to 5.24, do:

  First, add to /etc/make.conf:

  DEFAULT_VERSIONS+=  perl5=5.24

  Portupgrade users:
    portupgrade -o lang/perl5.24 -f lang/perl5.20

      You can now remove the DEFAULT_VERSIONS line added earlier
      from /etc/make.conf

      Then you will need to rebuild everything that uses libperl.so, you
      can do so with:

    portupgrade -f `pkg shlib -qR libperl.so.5.20`

  Portmaster users:
    portmaster -o lang/perl5.24 lang/perl5.20

      You can now remove the DEFAULT_VERSIONS line added earlier
      from /etc/make.conf

      Then you will need to rebuild everything that uses libperl.so, you
      can do so with:

    portmaster -f `pkg shlib -qR libperl.so.5.20`
 2016年11月3日時点で perl5.20 はなくなって perl5.24 がデフォルトバージョンになっているのでした。

2. バージョンアップ

 以下のコマンドでアップデートします。

portupgrade -o lang/perl5.24 -f perl5.20
portupgrade -vRr perl5

3. /etc/make.conf 編集

 どうも、このアップデートを行ったら /etc/make.conf

DEFAULT_VERSIONS+=perl5=5.24
 という1行を追加すべきようです。