最近、FreeBSD Ports の更新が安定していたのですが、久しぶりにやっかいそうなエラーが発生しました。
本日、ports パッケージをメンテナンスしようと、pkg version コマンドで更新状況を確認したところ、perl 5.16 が更新対象になっていました。
perl5-5.16.3_11 < needs updating (index has 5.16.3_12)
特に気にせず portupgrade -a で更新をかけたところ、ファイルが衝突を起こしているというエラーが発生しました。
---> Deinstalling 'perl5-5.16.3_11' Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: perl5-5.16.3_11 The operation will free 41 MB. [1/1] Deleting perl5-5.16.3_11: 100% [Reading data from pkg(8) ... - 480 packages found - done] ---> Installing the new version via the port ===> Installing for perl5.16-5.16.3_12 ===> Registering installation for perl5.16-5.16.3_12 pkg-static: perl5.16-5.16.3_12 conflicts with p5-CPAN-Meta-2.142690 (installs files into the same place). Problematic file: /usr/local/lib/perl5/5.16/man/man3/CPAN::Meta.3.gz *** Error code 70 Stop in /usr/ports/lang/perl5.16. *** Error code 1 Stop in /usr/ports/lang/perl5.16. ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20141128-48605-m1hx6l env UPGRADE_TOOL=portupgrade UPGRADE_PORT=perl5-5.16.3_11 UPGRADE_PORT_VER=5.16.3_11 make reinstall ---> Restoring the old version Installing perl5-5.16.3_11: 100% ** Fix the installation problem and try again.
なぜ?
状況がよくわからないので手動で作業してみることに。
# pwd /usr/ports/lang/perl5.16 spc0# make install ===> Installing for perl5.16-5.16.3_12 ===> Checking if perl5.16 already installed ===> Registering installation for perl5.16-5.16.3_12 pkg-static: perl5.16-5.16.3_12 conflicts with perl5-5.16.3_11 (installs files into the same place). Problematic file: /usr/local/bin/a2p *** Error code 70 Stop in /usr/ports/lang/perl5.16.
どうも、ビルドには問題ないようで、インストール時に別パッケージとコンフリクトが発生している模様。
調べてみたところ、どうも FreeBSDにインストールされている perl のバージョンが 5.16から5.18に更新になったようで、その関係がまだうまくいっていないような印象です。UPDATING テキストを見てみたところ、
20141126: AFFECTS: users of lang/perl5.* AUTHOR: mat@FreeBSD.org The directories where Perl modules are installed has changed. All affected ports' PORTREVISION have been bumped, so upgrading should be as painless as possible. The old directories have been kept in the default Perl @INC to make it even more painless. The default Perl has been switched to lang/perl5.18. These examples are for switching from lang/perl5.16, if you are running a different version, replace lang/perl5.16 with the origin of the Perl you have installed. Binary package users: # pkg upgrade -f Portupgrade users: 0) Fix pkgdb.db (for safety): pkgdb -Ff 1) Reinstall new version of Perl (5.18): portupgrade -o lang/perl5.18 -f lang/perl5.16 2) Reinstall everything that depends on Perl: portupgrade -fr lang/perl5.18
となっていて、バイナリー更新をかければよさそうです。
しかし、Perlのバージョンを更新しようものなら、再度 dropbox-api コマンドでトラブルが発生すること間違いなし。今回の更新は特にセキュリティーには影響なさそうなのでしばらく延期することにしました。