summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-12-08 09:46:55 -0800
committerZac Medico <zmedico@gentoo.org>2011-12-08 09:46:55 -0800
commit3bd94dbffd4cf338de8cc786f60525b0a84d2562 (patch)
tree97dfe70a2b0ab376b22c8bf40cb547beced0bfc4 /pym
parentc281c323adf14ece439b98dcf35531666266a0a5 (diff)
downloadportage-3bd94dbffd4cf338de8cc786f60525b0a84d2562.tar.gz
portage-3bd94dbffd4cf338de8cc786f60525b0a84d2562.tar.bz2
portage-3bd94dbffd4cf338de8cc786f60525b0a84d2562.zip
Support FEATURES=force-prefix.
This adjusts the logic from commit ff52f9dc31004becb8022e6437088d01917f413c to use FEATURES=force-prefix instead of USE=prefix. This has the advantage that we don't have to make any assumptions about the USE=prefix.
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/const.py2
-rw-r--r--pym/portage/package/ebuild/config.py17
2 files changed, 8 insertions, 11 deletions
diff --git a/pym/portage/const.py b/pym/portage/const.py
index 29c3878a6..3dad36a2e 100644
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@ -90,7 +90,7 @@ SUPPORTED_FEATURES = frozenset([
"ccache", "chflags", "clean-logs",
"collision-protect", "compress-build-logs",
"digest", "distcc", "distcc-pump", "distlocks", "ebuild-locks", "fakeroot",
- "fail-clean", "force-mirror", "getbinpkg",
+ "fail-clean", "force-mirror", "force-prefix", "getbinpkg",
"installsources", "keeptemp", "keepwork", "fixlafiles", "lmirror",
"metadata-transfer", "mirror", "multilib-strict", "news",
"noauto", "noclean", "nodoc", "noinfo", "noman",
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 1ccaee7c8..fb79e5ee1 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2238,17 +2238,14 @@ class config(object):
if not eapi_exports_merge_type(eapi):
mydict.pop("MERGE_TYPE", None)
- # Prefix variables are supported beginning with EAPI 3, or when EPREFIX
- # is non-empty (implying that EPREFIX support is required in the
- # current environment, regardless of EAPI). For EAPIs prior to 3,
- # ebuild helpers rely on these variables only when USE=prefix is
- # enabled. This is safe because the prefix flag should be masked in all
- # non-prefix profiles, and older EAPIs would otherwise be useless with
- # prefix configurations. This brings compatibility with the prefix
- # branch of portage, which also supports EPREFIX for all EAPIs (for
- # obvious reasons).
+ # Prefix variables are supported beginning with EAPI 3, or when
+ # force-prefix is in FEATURES, since older EAPIs would otherwise be
+ # useless with prefix configurations. This brings compatibility with
+ # the prefix branch of portage, which also supports EPREFIX for all
+ # EAPIs (for obvious reasons).
if phase == 'depend' or eapi is None or \
- (not eapi_supports_prefix(eapi) and not mydict.get("EPREFIX")):
+ ('force-prefix' not in self.features and
+ not eapi_supports_prefix(eapi)):
mydict.pop("ED", None)
mydict.pop("EPREFIX", None)
mydict.pop("EROOT", None)