以前一直不知道怎么切,后来得知 Gentoo 更换了处理源的方式,也就可以切换了.

现在同步的话应该就会提示 GENTOO_MIRRORS is deprecated 这样的东西,切换为 repos.conf 即可.

mkdir -p /etc/portage/repos.conf
cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf

然后我们修改一下 gentoo.conf ,将其指向 Git repo.

#vim /etc/portage/repos.conf/gentoo.conf
[gentoo]
location = /usr/portage
sync-type = git
sync-uri = git://anongit.gentoo.org/repo/gentoo.git
auto-sync = yes

然后我们需要重新同步 Portage Tree

rm -rf /usr/portage/*
emerge --sync

之后 emerge-websync 就作废了,使用 emerge --sync 即可.


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.