portage/mail.py: don't encode Date header to bytes

As reported in bug #520752 comment #4, the _unicode_encode usage
triggers the following error with python 3.3.5:

	'bytes' object has no attribute 'encode'"

The _unicode_encode call is not needed for python2.x, since formatdate
returns bytes for python2.x.

Fixes: 7204b87040ed ("portage/mail.py: Make email date, timestamp RFC-compliant Bug 520752")
X-Gentoo-Bug: 520752
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=520752
_emerge: Fix hard-coded emerge-fetch.log locations Bug 520378

Use emergelog._emerge_log_dir instead of the hard-coded paths.
_emerge: Add the missed emerge-fetch.log in previous commit
Wrap fakeroot around MISC_SH_BINARY calls

When feature fakeroot is active all pre/post actions need
to be called with the fakeroot wrapper.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
dep_zapdeps: fix bug #522652

For cases such as || ( X <A-2 ), where X is unsatisfiable and A-1 is
installed, fix dep_zapdeps to make the correct choice.
Add test for bug #522652 with slot-operator

This test case uses || ( bar foo:= ) syntax that is forbidden by PMS.
_solve_..slot_conflicts: fix bug #510270

This fixes an IndexError in _solve_non_slot_operator_slot_conflicts
which occurs when none of the conflict packages matched a particular
atom. This typically means that autounmask broke a USE-dep, but it could
also be due to the slot not matching due to multislot (bug #220341).
Either way, don't try to solve this conflict. Instead, force all of the
associated conflict nodes into the graph so that they are protected from
removal by the conflict solver.

X-Gentoo-Bug: 510270
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=510270
runtests.sh: Update pypy target
setup.py: Update version for the release
Update NEWS and RELEASE-NOTES
emaint: Assign all module __init__.py's __doc__ to a variable intsead

Due to distutils-r1 eclass optimization level, __doc__ strings are removed, breaking the
plugin system's use of __doc__ for it's module description(s).
This causes tracebacks when trying to run emaint.

brian@big_daddy $ emaint -h
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/emaint", line 36, in <module>
    emaint_main(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/portage/emaint/main.py", line 161, in emaint_main
    parser = ArgumentParser(usage=usage(module_controller))
  File "/usr/lib64/python2.7/site-packages/portage/emaint/main.py", line 78, in usage
    desc = textwrap.wrap(module_controller.get_description(mod), 65)
  File "/usr/lib64/python2.7/textwrap.py", line 354, in wrap
    return w.wrap(text)
  File "/usr/lib64/python2.7/textwrap.py", line 325, in wrap
    text = self._munge_whitespace(text)
  File "/usr/lib64/python2.7/textwrap.py", line 154, in _munge_whitespace
    text = text.expandtabs()
AttributeError: 'NoneType' object has no attribute 'expandtabs'
brian@big_daddy $

Problem found by: Zac Medico <zmedica@gentoo.org>
_compute_abi_rebuild_info: fix bug #521990

Since self._dynamic_config._slot_operator_deps only contains deps for
packages added to the graph, it doesn't contain potentially relevant
deps of installed packages that have not been added to the graph.
Therefore, generate pseudo-deps for such installed packages, and use
those to generate the rebuild info.

X-Gentoo-Bug: 521990
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=521990
ResolverPlayground: inline _iter_forced_rebuilds

Use an inline generator expression rather than a function, since the
function was only used once.
_backtrack_depgraph: fix bug #523048

This fixes _backtrack_depgraph to immediately report necessary
REQUIRED_USE changes instead of discarding the graph. This is
accomplished by replacing the depgraph.success_without_autounmask
method with a new need_config_change method that accounts for both
autounmask and REQUIRED_USE changes.

X-Gentoo-Bug: 523048
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523048
Acked-by: Brian Dolbec <dolsen@gentoo.org>
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
_solve_..slot_conflicts: fix bug #522084

Fix _solve_non_slot_operator_slot_conflicts to add all parents to the
conflict_graph, even for parents where the atom matches all relevant
nodes. Otherwise, we risk removing all of the matched nodes from the
graph, which would cause a missed update.

X-Gentoo-Bug: 522084
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=522084
Reviewed-by: Alexander Berntsen <bernalex@gentoo.org>
Update sys.path in scripts only when using not installed instance of Portage.

Modules of installed instance of Portage are now placed in standard location,
which is included in default sys.path.
chpathtool: migrate docstrings to a variable

Due to python optimizations, __doc__ are removed.
Reviewed by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
xattr-helper: Migrate docstrings to a variable

Due to python optimizations, __doc__ are removed.
Reviewed by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
portageq: Migrate docstrings to a dictionary

Due to python optimizations, __doc__ are removed.
Reviewed by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
testpath: Add a generic testpath script

Source this testpath script from the base checkout directory to run all checkout code.