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.
Revert "Rewrite default ebuild phase setting code" (bug 523182)

This reverts commit 772ed29fd9e7cf722aed943adbe33a27f250e1ff.
X-Gentoo-Bug: 523182
X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=523182
_quickpkg_dblink: fix bug #523152

This fixes the unmerge-backup and downgrade-backup features to be
compatible with the new setup.py quickpkg install location, while
preserving compatibility for running from a source tree (for unit tests
or developement purposes). If not running from a source tree, then the
PATH variable is used to locate the quickpkg binary.

X-Gentoo-Bug: 523152
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523152
Support unprivileged mode for bug #433453.

This takes the existing unprivileged prefix support and enables it to
work when EPREFIX is empty. This "unprivileged" is automatically
enabled if the current user is not root, but has write access to the
EROOT directory (not due to the 0002 bit). For use in conditional logic
(for example, see fowners diff), "unprivileged" is automatically added
to the FEATURES variable.

X-Gentoo-Bug: 433453
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=433453
create_trees: whitelist PORTAGE_DEPCACHEDIR

This fixes PORTAGE_DEPCACHEDIR to work for ROOT=/ when working with a
different target ROOT.