Could not sync portage for some time - realizing it was because I was using git as sync method and the repo was not maintained anymore. They also provided new links so I updated sync-uri
option in /etc/portage/repos.conf/gentoo.conf
[gentoo]
location = /var/db/repos/gentoo
sync-type = git
#sync-uri = https://github.com/gentoo/gentoo-portage-rsync-mirror # old
sync-uri = https://github.com/gentoo-mirror/gentoo # new
auto-sync = true
But this was without effect when running emerge --sync
:
# emerge --sync
>>> Syncing repository 'gentoo' into '/var/db/repos/gentoo'...
/usr/bin/git pull
Already up-to-date.
=== Sync completed for gentoo
Today I realized that I can check remote url of the repository:
# cd /var/db/repos/gentoo
# git remote -v
origin https://github.com/gentoo/gentoo-portage-rsync-mirror (fetch)
origin https://github.com/gentoo/gentoo-portage-rsync-mirror (push)
So it is still set to the old one.
I tried to change it to the new one, but it was first complaining about git config and even after that I could not sync:
# git remote set-url origin https://github.com/gentoo-mirror/gentoo
# git remote -v
origin https://github.com/gentoo-mirror/gentoo (fetch)
origin https://github.com/gentoo-mirror/gentoo (push)
# git config user.email "root@gentoo.xxx"
# git config user.name "Root One"
# emerge --sync
>>> Syncing repository 'gentoo' into '/var/db/repos/gentoo'...
/usr/bin/git clone --depth 1 https://github.com/gentoo-mirror/gentoo .
fatal: destination path '.' already exists and is not an empty directory.
!!! git clone error in /var/db/repos/gentoo
!!! Repository 'x-gentoo' is missing masters attribute in '/var/db/repos/gentoo/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
So at the end I ended up with deleting whole directory /var/db/repos/gentoo
except distfiles/
with ls -a | grep -v distfiles | xargs rm -r
which solved my problem and I could finally sync..
Question is: is there some user friendly / right way how to recreate/regenerate gentoo overlay which is using git?
I think more people will have this problem once repository of overlay will be changed.
/usr/portage
, and uses the rsync protocol. Please manage user created overlays withlayman
and in the event you lose the tree again, useemerge-webrsync
– eyoung100 Sep 01 '15 at 05:01layman
s capabilities more deeply for now. Thanks for comment. – A.D. Sep 01 '15 at 09:52