Merged from trunk 4785:4794
Optimize config.setcpv so that it only calls regenerate when necessary.
Thanks to Jason Stubbs for the initial patch from bug #17367.
Use reset instead of regenerate (revert part of the previous commit) in
order to properly clear the env layer of the config.
Fix visibility checks so that binary packages aren't masked just because
there is no matching ebuild in the tree.
Call load_infodir before the setup phase for binary packages so that USE
is properly set.
Don't put empty incrementals in the environment, unless they are already
set.
Add support for masking of packages via ACCEPT_LICENSE and
/etc/portage/package.license. Thanks to Jason Stubbs for the initial
patch from bug #17367.
s/str_matches/acceptable_licenses/ typo
Fix gcc version parsing once again for bug #137786. sigh. :)
svn path=/main/branches/prefix/; revision=4795