Add cross-prefix support
authorRuud Koolen <redlizard@redlizard.nl>
Mon, 17 Jun 2013 07:21:41 +0000 (09:21 +0200)
committerZac Medico <zmedico@gentoo.org>
Tue, 18 Jun 2013 20:32:22 +0000 (13:32 -0700)
commitc9f6aa9f0151adb3c86706eaef1914cdbdcf2b6d
treeec4ee1d8b763c572acf01499dff7a700e97f54c8
parentd444a9298471d0c2c460bf82c9b08c872e031b0d
Add cross-prefix support

This patch series adds support for using a portage installed in one prefix
to build packages with a different prefix.

The current portage has a single EPREFIX variable specifying both the prefix
of the portage installation, and the prefix of the packages portage is
building. This patch series splits it into two parts: the
portage.const.EPREFIX variable specifying the prefix of the portage
installation, used for constructing the PATH as well as the paths to files
belonging to a portage installation itself rather than a target root; and the
 EPREFIX setting in config instances, specifying the prefix of the
to-be-built packages and being used for almost everything else.

The EPREFIX config setting defaults to const.EPREFIX, but can be overridden
by the EPREFIX environment variable, as well as the emerge --prefix option.
This allows one to install systems with different prefixes using
`EPREFIX=/foo emerge @system`, though some unrelated changes need to happen
elsewhere first in order to make that a reality.

Ruud Koolen (3):
  Distinguish between portage prefix and package prefix
  Based GLOBAL_CONFIG_PATH and DEPCACHE_PATH on portage prefix
  Pick up EPREFIX environment variable
14 files changed:
bin/dispatch-conf
bin/phase-helpers.sh
bin/portageq
man/emerge.1
pym/_emerge/actions.py
pym/_emerge/main.py
pym/portage/_legacy_globals.py
pym/portage/_sets/__init__.py
pym/portage/dispatch_conf.py
pym/portage/package/ebuild/_config/LocationsManager.py
pym/portage/package/ebuild/config.py
pym/portage/package/ebuild/doebuild.py
pym/portage/package/ebuild/fetch.py
pym/portage/tests/resolver/ResolverPlayground.py