FreeBSDでパッケージツリー更新しようとして(Debianでいうapt update)
pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.最新なので更新の必要は無い、と言われたのでgitをインストールしようとしたところ
pkg install git
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
The following 24 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
git: 2.22.0
Proceed with this action? [y/N]: y
pkg: http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/All/git-2.22.0.txz: Not Foundと、git-2.22.0.txzが無いとか言われてエラーで終了。なんで??と、ブラウザで
http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/All/
を開いたところ、
git-2.23.0.txzと、新しいのがあるじゃないか。
どういうことだと色々調べて意外と見つからなかったが…、pkgに強制更新オプション-fで解決らしい。
pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 940 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 6.6MB/s 00:01
Processing entries: 100%
FreeBSD repository update completed. 32767 packages processed.
All repositories are up to date.あっ、更新された。
pkg install git
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 22 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
git: 2.23.0で、ちゃんと2.23.0を取りに行って、インストールが成功した。
pkgの強制更新オプション-fって、man pkgにも載っていないように見えるが…見方が悪いのだろうか。ともあれ、今後は常にpkg update -fと打っておけば間違いはないです。

