My gentoo tree is mounted nfs, ro on my virtual machines. As a result, these systems cannot sync. I created a minimal repos.conf file: [DEFAULT] main-repo = gentoo [gentoo] location = /var/lib/repos/gentoo [local] location = /var/lib/repos/local A quick snippet from the man page: auto-sync This setting determines if the repo will be synced during "emerge --sync" or "emaint sync --auto" runs. This allows for repositories to be synced only when desired via "emaint sync --repo foo". Valid values: yes, no, true, false. If unset, the repo will be treated as set yes, true. sync-type Specifies type of synchronization performed by `emerge --sync`. Valid non-empty values: cvs, git, rsync, svn, websync (emerge-webrsync) This attribute can be set to empty value to disable synchronization of given repository. Empty value is default. sync-uri Specifies URI of repository used for synchronization performed by `emerge --sync`. This attribute can be set to empty value to disable synchronization of given repository. Empty value is default. When performing a sync operation, portage attempted sync the gentoo repo. However, it did not attempt to sync the local repo, which means the gentoo repo is being handled differently (which I disagree with, and hence the bug report) I came to the conclusion that the issue is gentoo repo specific by swapping main-repo and arrived at the same issue. grknight and ecormier on IRC thought this might be related to the fact that auto-sync is on by default, but even if that is the way it is written I think it the logic doesn't make sense as is. End of the day: if there is no sync-type or sync-uri, a sync shouldn't happen, and it is, but only for the gentoo repo.
That is because, the gentoo repo has backup settings in /usr/lib/portage/config/repos.conf. In fact you do not even need a gentoo.conf in /etc/portage/repos.conf directory. It is only needed if you wish to override the default settings. To fix your problem, just add all entries to your /etc/portage/repos.conf/gentoo.conf Side note, If I didn't set auto-sync=yes in the defaults for the gentoo repo. I would have been lambasted and inundated with bug reports and claims of broken portage because emerge --sync didn't sync anything. When I released the new portage with the plug-in sync system with the additional features and capabilities.
(In reply to Brian Dolbec from comment #1) > That is because, the gentoo repo has backup settings in > /usr/lib/portage/config/repos.conf. > > In fact you do not even need a gentoo.conf in /etc/portage/repos.conf > directory. > It is only needed if you wish to override the default settings. > > To fix your problem, just add all entries to your > /etc/portage/repos.conf/gentoo.conf > > Side note, If I didn't set auto-sync=yes in the defaults for the gentoo > repo. I would have been lambasted and inundated with bug reports and claims > of broken portage because emerge --sync didn't sync anything. When I > released the new portage with the plug-in sync system with the additional > features and capabilities. You don't view it as an input validation error (the input being the values set in the config)? The fact that it proceeds despite contradictory flag settings sounds like a bad idea to me. I have no issue with auto-sync = yes for default. I just think for a sync operation, you need a: if sync-type == "" or sync-uri == ""; then abort syncing repo; fi or something like that. The idea being that situations that prevent syncing should actually do so, regardless of anything else. Another reason to advocate for fixing it, this is the result of default settings only, so I think program logic should handle it such that default values don't cause breakage. Thoughts?
After a quick explanation from Arfrever, I understand that the issue is that it is pulling in values for sync-uri/sync-type from /usr/share/portage/config/repos.conf, so they are non-null, hence the issue. Switching to invalid.