目次

FreeBSDで異なるパッケージバージョンへの更新方法

2016/03/07
すぐ忘れるのでメモ

更新手順

portupgradeコマンドで Perl 5.18 から Perl 5.20 へ更新する例。

pkgコマンド

portupgrade は pkg と連動しているので、先にpkg側の定義を変更しておく。

root@kurokame:/usr/ports # pkg set -o lang/perl5.18:lang/perl5.20
Change origin from lang/perl5.18 to lang/perl5.20 for perl5-5.18.4_17? [y/N]: y
root@kurokame:/usr/ports #

portupgradeコマンド

portupgradeでアップグレード先を定義。

root@kurokame:/usr/ports # portupgrade -o lang/perl5.20 -f perl5.18
[Reading data from pkg(8) ... - 308 packages found - done]
root@kurokame:/usr/ports #

portupgradeコマンドでアップグレード

Perl 5.18 から Perl 5.20 への更新が行われる。

root@kurokame:/usr/ports # portupgrade 'perl*'
[Reading data from pkg(8) ... - 308 packages found - done]
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 25787 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.........19000.........20000.........21000.........22000.........23000.........24000.........25000....... ..... done]
** Detected a package name change: perl5 (lang/perl5.20) -> 'perl5.20' (lang/perl5.20)
--->  Upgrading 'perl5-5.18.4_17' to 'perl5.20-5.20.3_8' (lang/perl5.20)
--->  Building '/usr/ports/lang/perl5.20'
===>  Cleaning for perl5.20-5.20.3_8
:
:
:
:
install  -m 0644 /usr/ports/lang/perl5.20/work/perl-man.conf /usr/ports/lang/perl5.20/work/stage/usr/local/etc/man.d/perl5.20.conf
====> Compressing man pages (compress-man)
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 308 packages found - done]
--->  Deinstalling 'perl5-5.18.4_17'
--->  Preserving /usr/local/lib/perl5/5.18/mach/CORE/libperl.so.5.18.4 as /usr/local/lib/compat/pkg/libperl.so.5.18.4
Updating database digests format: 100%
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.18.4_17

The operation will free 50 MiB.
[1/1] Deinstalling perl5-5.18.4_17...
[1/1] Deleting files for perl5-5.18.4_17: 100%
[Reading data from pkg(8) ... - 307 packages found - done]
--->  Installing the new version via the port
===>  Installing for perl5.20-5.20.3_8
===>   Registering installation for perl5.20-5.20.3_8
Installing perl5.20-5.20.3_8...
The /usr/bin/perl symlink has been removed starting with Perl 5.20.
For shebangs, you should either use:

#!/usr/local/bin/perl

or

#!/usr/bin/env perl

The first one will only work if you have a /usr/local/bin/perl,
the second will work as long as perl is in PATH.

===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/lib/perl5/5.20/mach/CORE/libperl.so.5.20.3

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.perl.org/
===>  Cleaning for perl5.20-5.20.3_8
--->  Cleaning out obsolete shared libraries
root@kurokame:/usr/ports #