Remove EAPIPREFIX, remain backwards compatible for now by still accepting 'prefix...
authorFabian Groffen <grobian@gentoo.org>
Fri, 27 Mar 2009 11:43:55 +0000 (11:43 -0000)
committerFabian Groffen <grobian@gentoo.org>
Fri, 27 Mar 2009 11:43:55 +0000 (11:43 -0000)
svn path=/main/branches/prefix/; revision=13234

configure.in
pym/_emerge/__init__.py
pym/portage/__init__.py
pym/portage/const.py
pym/portage/const_autotool.py
pym/portage/dbapi/bintree.py

index 0ffb90b24671725da564f92d4d7be8f61380ffee..ca463bc644ba75bb41e959cdeac6e37463163e57 100644 (file)
@@ -208,10 +208,8 @@ AC_HELP_STRING([--with-offset-prefix],
 if test "x$DOMAIN_PREFIX" = "x"
 then
        PORTAGE_EPREFIX='""'
-       EAPIPREFIX='None'
 else
        PORTAGE_EPREFIX='path.normpath("'"$DOMAIN_PREFIX"'")'
-       EAPIPREFIX='"prefix"'
 fi
 
 DEFAULT_PATH="${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
@@ -236,7 +234,6 @@ AC_SUBST(rootuid)
 AC_SUBST(rootgid)
 AC_SUBST(DOMAIN_PREFIX)
 AC_SUBST(PORTAGE_EPREFIX)
-AC_SUBST(EAPIPREFIX)
 AC_SUBST(DEFAULT_PATH)
 AC_SUBST(PORTAGE_BASE,['${exec_prefix}/lib/portage'])
 AM_CONDITIONAL(INSTALL_PYTHON_SOURCES, test x$enable_py_sources = xtrue)
index ee28e11e09c2688f92ef924d6790baaa4912636d..1d2c95e6e1244efb1deb6ca13c415d95da80cca0 100644 (file)
@@ -63,7 +63,7 @@ portage.dep._dep_check_strict = True
 import portage.util
 import portage.locks
 import portage.exception
-from portage.const import EPREFIX, BPREFIX, EPREFIX_LSTRIP, EAPIPREFIX
+from portage.const import EPREFIX, BPREFIX, EPREFIX_LSTRIP
 from portage.data import secpass
 from portage.elog.messages import eerror
 from portage.util import normalize_path as normpath
@@ -3032,7 +3032,7 @@ class EbuildExecuter(CompositeTask):
 
                pkg = self.pkg
                phases = self._phases
-               eapi = pkg.metadata["EAPI"].replace(EAPIPREFIX, "").strip()
+               eapi = pkg.metadata["EAPI"].replace("prefix", "").strip()
                if eapi in ("0", "1"):
                        # skip src_prepare and src_configure
                        phases = phases[2:]
@@ -6090,15 +6090,10 @@ class depgraph(object):
                        print "!!! One of the following masked packages is required to complete your request:"
                        have_eapi_mask = show_masked_packages(masked_packages)
                        if have_eapi_mask:
-                               if portage.const.EAPIPREFIX:
-                                       p = portage.const.EAPIPREFIX + " "
-                               else:
-                                       p = ''
-                               print
                                msg = ("The current version of portage supports " + \
-                                       "EAPI '%s%s'. You must upgrade to a newer version" + \
+                                       "EAPI '%s'. You must upgrade to a newer version" + \
                                        " of portage before EAPI masked packages can" + \
-                                       " be installed.") % (p, portage.const.EAPI)
+                                       " be installed.") % (portage.const.EAPI)
                                from textwrap import wrap
                                for line in wrap(msg, 75):
                                        print line
index bc512cebc75923ee38d0d590eea3c91dc51e78ac..711f0b256b39a5774712bc00acaef0421cdddcc5 100644 (file)
@@ -5062,21 +5062,11 @@ def eapi_is_supported(eapi):
        # However, back to reality, we just look for all <desc> we require,
        # and don't do version tricks other than the main tree does.
 
-       eapi = str(eapi).split() # note Python's contact for this special case
+       eapi = str(eapi).split() # note Python's contract for this special case
 
-       # these are the properties that MUST be present (should)
-       properties = set()
-       if portage.const.EAPIPREFIX:
-               properties.add(portage.const.EAPIPREFIX) # clumpsy temporary solution
-
-       for prop in properties:
-               if prop not in eapi:
-                       return False
-               else:
-                       eapi.remove(prop)
-       
-       # now check if what's left is supported (can)
+       # check what's supported (can)
        properties = set(_testing_eapis) # another clumpsy solution
+       properties.add("prefix") # clumpsy temporary solution
        for i in range(portage.const.EAPI + 1):
                properties.add(str(i))
 
index 01f67d92dcad81b47cb7150b1b4510ff0b3d552e..40faf7f3580adf89f470bae3c3dc80124a1e80f9 100644 (file)
@@ -14,8 +14,6 @@ BPREFIX = EPREFIX
 # pick up EPREFIX from the environment if set
 if "EPREFIX" in os.environ:
        EPREFIX = os.path.normpath(os.environ["EPREFIX"])
-if "EAPIPREFIX" in os.environ:
-       EAPIPREFIX = os.environ["EAPIPREFIX"]
 
 # ===========================================================================
 # START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF
index 8a5c5e9ac47aea1b3fad4ea50f5aa30f83a36d2c..04a91bbf8ec02d41a560a3e9181f2e5ce6f757c0 100644 (file)
@@ -1,15 +1,14 @@
-# Copyright: 2005-2007 Gentoo Foundation
+# Copyright: 2005-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 # all vars that are to wind up in portage_const must have their name listed in __all__
 
-__all__ = ["EAPIPREFIX", "EPREFIX", "SYSCONFDIR", "DATADIR", "PORTAGE_BASE",
+__all__ = ["EPREFIX", "SYSCONFDIR", "DATADIR", "PORTAGE_BASE",
                "portageuser", "portagegroup", "rootuser", "rootuid", "rootgid"]
 
 from os import path
 
-EAPIPREFIX   = @EAPIPREFIX@
 EPREFIX      = @PORTAGE_EPREFIX@
 SYSCONFDIR   = path.normpath("@sysconfdir@")
 DATADIR      = path.normpath("@datadir@")
index f97c2f9bc6d37483106749cb929870a42cde9023..5009fc875bf50034b6724dc55906b4c8b9428183 100644 (file)
@@ -17,7 +17,7 @@ from portage.cache.mappings import slot_dict_class
 from portage.dbapi.virtual import fakedbapi
 from portage.exception import InvalidPackageName, \
        PermissionDenied, PortageException
-from portage.const import EAPI, EAPIPREFIX
+from portage.const import EAPI
 
 from portage import dep_expand, listdir, _check_distfile, _movefile
 
@@ -170,13 +170,9 @@ class binarytree(object):
                        self._pkgindex_header_keys = set(["ACCEPT_KEYWORDS", "CBUILD",
                                "CHOST", "CONFIG_PROTECT", "CONFIG_PROTECT_MASK", "FEATURES",
                                "GENTOO_MIRRORS", "INSTALL_MASK", "SYNC", "USE", "EAPI", "EPREFIX"])
-                       if EAPIPREFIX:
-                               eapi = EAPIPREFIX + " " + str(EAPI)
-                       else:
-                               eapi = str(EAPI)
                        self._pkgindex_default_pkg_data = {
                                "DEPEND"  : "",
-                               "EAPI"    : eapi,
+                               "EAPI"    : "0",
                                "IUSE"    : "",
                                "KEYWORDS": "",
                                "LICENSE" : "",