LoginSignup
6
5

More than 1 year has passed since last update.

Gentoo Linux の emerge --sync を速くする

Last updated at Posted at 2021-03-08

emerge --sync がいつまで経っても終わらない、特に

* Verifying /usr/portage/.tmp-unverified-download-quarantine ..

に何分もかかる!なんてことはないでしょうか。

Portage ツリーを Git で同期する

デフォルトでは rsync を使用して Portage ツリーを同期しています。rsync の署名検証は遅いので、これを Git で同期するように変更します。
同期先のリポジトリとして GitHub にある公式のミラー (gentoo-mirror/gentoo) を使用します。

/etc/portage/repos.conf/gentoo.conf
[DEFAULT]
main-repo = gentoo

[gentoo]
# 最近の Portage では /var/db/repos/gentoo
location = /usr/portage
sync-type = git
sync-uri = https://github.com/gentoo-mirror/gentoo
sync-depth = 1
sync-git-verify-commit-signature = yes
sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
auto-sync = yes

既にダウンロード済みの Portage ツリーを一旦削除します。

sudo rm -rf /usr/portage/*
# sudo rm -rf /var/db/repos/gentoo/*

emerge --sync します。最初は時間がかかりますが、次回からはすぐに終わるようになります。

sudo emerge --sync
6
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5