When 'emerge sync' finish, it sometimes renames ebuild or categories. User's custom portage configuration in /etc/portage/ becomes invalid. Example: I had "=net-mail/sylpheed-claws-0.9.10" in /etc/portage/package.mask After an emerge sync, sylpheed claws was put in the "client-mail" category, hence my setting doesn't work anymore. Todo: I think emerge sync should do a sed in the /etc/portage/* files to replace any renamed package.
IMO /etc should be read-only for portage
IMO this is necessary. I was also hit by the net-mail package moves. Most of my use flags are set through /etc/portage/package.mask, including those of postfix. After the package move and upgrading, I rebooted my box after which postfix decided every email was corrupt. I realized the change in use flags, recompiled and everything worked again, but the fixdbentries code on /etc/portage would have saved me the hassle. I think that in this case, portage editing /etc/portage/* would not be adding or removing anything. It would just be maintaining system consistency. If editing directly is taboo, I think that at minimum portage should create new config files to be merged be etc-update.
New ._config file is a legitimate way to handle this. The issue is getting it "merged" at the right time. There are no notifications at this stage in the process. It checks nothing after a sync. So we'd have to make it a special case check and verify each line in the files. It's fairly ugly.
Bug has been fixed and released in stable portages on or before 2.0.51-r2