GLEP 55 removal
authorDaniel Robbins <drobbins@funtoo.org>
Tue, 6 Jul 2010 20:29:04 +0000 (14:29 -0600)
committerZac Medico <zmedico@gentoo.org>
Wed, 7 Jul 2010 01:24:31 +0000 (18:24 -0700)
bin/ebuild
man/make.conf.5
pym/_emerge/EbuildMetadataPhase.py
pym/portage/__init__.py
pym/portage/dbapi/porttree.py
pym/portage/manifest.py
pym/portage/package/ebuild/config.py
pym/portage/package/ebuild/digestcheck.py
pym/portage/package/ebuild/doebuild.py

index 7d543a1090af2443f95e844379cbb3426e6d51b5..08a68f1008cb8ba84ae9f6062479d520e6d14860 100755 (executable)
@@ -104,10 +104,7 @@ if not opts.color == 'y' and \
 ebuild = pargs.pop(0)
 
 pf = None
-if 'parse-eapi-glep-55' in portage.settings.features:
-       pf, eapi = portage._split_ebuild_name_glep55(
-               os.path.basename(ebuild))
-elif ebuild.endswith(".ebuild"):
+if ebuild.endswith(".ebuild"):
        pf = os.path.basename(ebuild)[:-7]
 
 if pf is None:
index 1546aae3ae7f19711e1fd504aa88f98a6d9d8701..b033e7ac0763041969da59f784948b539b775f99 100644 (file)
@@ -338,11 +338,6 @@ Parse \fBEAPI\fR from the head of the ebuild (first 30 lines). This feature
 is only intended for experimental purposes and should not be enabled under
 normal circumstances.
 .TP
-.B parse\-eapi\-glep\-55
-Parse \fBEAPI\fR from the file extension of the ebuild. This feature
-is only intended for experimental purposes and should not be enabled under
-normal circumstances.
-.TP
 .B preserve\-libs
 Preserve libraries when the sonames change during upgrade or downgrade.
 Libraries are preserved only if consumers of those libraries are detected.
index 43d715949aa8c1d5e960d1ffaa0065d046b42e24..77499a055f5c6c5fa307c68845ea5ccc124a5b14 100644 (file)
@@ -34,9 +34,6 @@ class EbuildMetadataPhase(SubProcess):
                ebuild_path = self.ebuild_path
 
                eapi = None
-               if 'parse-eapi-glep-55' in settings.features:
-                       pf, eapi = portage._split_ebuild_name_glep55(
-                               os.path.basename(ebuild_path))
                if eapi is None and \
                        'parse-eapi-ebuild-head' in settings.features:
                        eapi = portage._parse_eapi_ebuild_head(
index 764c97466c0d9a7ecbfe1edb2cb290663726eac3..68b99de6c59d5d6f49324e80600443529d8c67d6 100644 (file)
@@ -469,20 +469,6 @@ def _parse_eapi_ebuild_head(f):
                        break
        return '0'
 
-# True when FEATURES=parse-eapi-glep-55 is enabled.
-_glep_55_enabled = False
-
-_split_ebuild_name_glep55_re = re.compile(r'^(.*)\.ebuild(-([^.]+))?$')
-
-def _split_ebuild_name_glep55(name):
-       """
-       @returns: (pkg-ver-rev, eapi)
-       """
-       m = _split_ebuild_name_glep55_re.match(name)
-       if m is None:
-               return (None, None)
-       return (m.group(1), m.group(3))
-
 def _movefile(src, dest, **kwargs):
        """Calls movefile and raises a PortageException if an error occurs."""
        if movefile(src, dest, **kwargs) is None:
index cbbb290f82718bd841462b5ecfbf36b332d1c632..238db8319d34771d5ef7fdb772f7552bb7fa0d0c 100644 (file)
@@ -504,33 +504,11 @@ class portdbapi(dbapi):
                relative_path = mysplit[0] + _os.sep + psplit[0] + _os.sep + \
                        mysplit[1] + ".ebuild"
 
-               if 'parse-eapi-glep-55' in self.doebuild_settings.features:
-                       glep55_startswith = '%s.ebuild-' % mysplit[1]
-                       for x in mytrees:
-                               filename = x + _os.sep + relative_path
-                               if _os.access(_unicode_encode(filename,
-                                       encoding=encoding, errors=errors), _os.R_OK):
-                                       return (filename, x)
-
-                               pkgdir = _os.path.join(x, mysplit[0], psplit[0])
-                               try:
-                                       files = _os.listdir(_unicode_encode(pkgdir,
-                                               encoding=encoding, errors=errors))
-                               except OSError:
-                                       continue
-                               for y in files:
-                                       try:
-                                               y = _unicode_decode(y, encoding=encoding, errors=errors)
-                                       except UnicodeDecodeError:
-                                               continue
-                                       if y.startswith(glep55_startswith):
-                                               return (_os.path.join(pkgdir, y), x)
-               else:
-                       for x in mytrees:
-                               filename = x + _os.sep + relative_path
-                               if _os.access(_unicode_encode(filename,
-                                       encoding=encoding, errors=errors), _os.R_OK):
-                                       return (filename, x)
+               for x in mytrees:
+                       filename = x + _os.sep + relative_path
+                       if _os.access(_unicode_encode(filename,
+                               encoding=encoding, errors=errors), _os.R_OK):
+                               return (filename, x)
                return (None, 0)
 
        def _metadata_process(self, cpv, ebuild_path, repo_path):
@@ -672,9 +650,6 @@ class portdbapi(dbapi):
                        mydata = {}
                        eapi = None
 
-                       if 'parse-eapi-glep-55' in self.doebuild_settings.features:
-                               pf, eapi = portage._split_ebuild_name_glep55(
-                                       os.path.basename(myebuild))
                        if eapi is None and \
                                'parse-eapi-ebuild-head' in self.doebuild_settings.features:
                                eapi = portage._parse_eapi_ebuild_head(codecs.open(
@@ -918,7 +893,6 @@ class portdbapi(dbapi):
                                return cachelist[:]
                mysplit = mycp.split("/")
                invalid_category = mysplit[0] not in self._categories
-               glep55 = 'parse-eapi-glep-55' in self.doebuild_settings.features
                d={}
                if mytree:
                        mytrees = [mytree]
@@ -931,9 +905,7 @@ class portdbapi(dbapi):
                                continue
                        for x in file_list:
                                pf = None
-                               if glep55:
-                                       pf, eapi = portage._split_ebuild_name_glep55(x)
-                               elif x[-7:] == '.ebuild':
+                               if x[-7:] == '.ebuild':
                                        pf = x[:-7]
 
                                if pf is not None:
index a2a65aaf8d6089aaa8c83aea7e5355a9a212326f..ec801a3559e042dc161ee415fa5ca4327700c163 100644 (file)
@@ -34,10 +34,6 @@ def manifest2AuxfileFilter(filename):
 
 def manifest2MiscfileFilter(filename):
        filename = filename.strip(os.sep)
-       if portage._glep_55_enabled:
-               pf, eapi = portage._split_ebuild_name_glep55(filename)
-               if pf is not None:
-                       return False
        return not (filename in ["CVS", ".svn", "files", "Manifest"] or filename.endswith(".ebuild"))
 
 def guessManifestFileType(filename):
@@ -335,9 +331,7 @@ class Manifest(object):
                        if f[:1] == ".":
                                continue
                        pf = None
-                       if portage._glep_55_enabled:
-                               pf, eapi = portage._split_ebuild_name_glep55(f)
-                       elif f[-7:] == '.ebuild':
+                       if f[-7:] == '.ebuild':
                                pf = f[:-7]
                        if pf is not None:
                                mytype = "EBUILD"
index 57bbdd5dd4084cca754582a49b380808b81993c5..4cded99c94c7cef4e3439289e0f9ba98809688c4 100644 (file)
@@ -1007,12 +1007,8 @@ class config(object):
 
                        self["FEATURES"] = " ".join(sorted(self.features))
                        self.backup_changes("FEATURES")
-                       global _glep_55_enabled, _validate_cache_for_unsupported_eapis
                        if 'parse-eapi-ebuild-head' in self.features:
                                _validate_cache_for_unsupported_eapis = False
-                       if 'parse-eapi-glep-55' in self.features:
-                               _validate_cache_for_unsupported_eapis = False
-                               _glep_55_enabled = True
 
                        self._iuse_implicit_re = re.compile("^(%s)$" % \
                                "|".join(self._get_implicit_iuse()))
index 906bb4a57ac2ba5d34026b5e61bd00b3086f5b40..6861e3f9dc4c83d0b7695d41bf6975e35305d4d6 100644 (file)
@@ -3,7 +3,7 @@
 
 __all__ = ['digestcheck']
 
-from portage import os, _encodings, _split_ebuild_name_glep55, _unicode_decode
+from portage import os, _encodings, _unicode_decode
 from portage.exception import DigestException, FileNotFound
 from portage.localization import _
 from portage.manifest import Manifest
@@ -78,12 +78,9 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0):
                writemsg(_("!!! Expected: %s\n") % e.value[3], noiselevel=-1)
                return 0
        # Make sure that all of the ebuilds are actually listed in the Manifest.
-       glep55 = 'parse-eapi-glep-55' in mysettings.features
        for f in os.listdir(pkgdir):
                pf = None
-               if glep55:
-                       pf, eapi = _split_ebuild_name_glep55(f)
-               elif f[-7:] == '.ebuild':
+               if f[-7:] == '.ebuild':
                        pf = f[:-7]
                if pf is not None and not mf.hasFile("EBUILD", f):
                        writemsg(_("!!! A file is not listed in the Manifest: '%s'\n") % \
index 531cb2386d38ef56bd9cad9aedab7208493300ea..b6eedd416e89f1d94b32b943f59afbddd84ef071 100644 (file)
@@ -31,7 +31,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
 from portage import auxdbkeys, bsd_chflags, dep_check, \
        eapi_is_supported, merge, os, selinux, StringIO, \
        unmerge, _encodings, _parse_eapi_ebuild_head, _os_merge, \
-       _shell_quote, _split_ebuild_name_glep55, _unicode_decode, _unicode_encode
+       _shell_quote, _unicode_decode, _unicode_encode
 from portage.const import EBUILD_SH_ENV_FILE, EBUILD_SH_ENV_DIR, \
        EBUILD_SH_BINARY, INVALID_ENV_FILE, MISC_SH_BINARY
 from portage.data import portage_gid, portage_uid, secpass, \
@@ -66,11 +66,7 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings,
                cat = os.path.basename(normalize_path(os.path.join(pkg_dir, "..")))
 
        eapi = None
-       if 'parse-eapi-glep-55' in mysettings.features:
-               mypv, eapi = _split_ebuild_name_glep55(
-                       os.path.basename(myebuild))
-       else:
-               mypv = os.path.basename(ebuild_path)[:-7]
+       mypv = os.path.basename(ebuild_path)[:-7]
 
        mycpv = cat+"/"+mypv
        mysplit = _pkgsplit(mypv)
@@ -473,12 +469,9 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 
                        # Make sure that all of the ebuilds are
                        # actually listed in the Manifest.
-                       glep55 = 'parse-eapi-glep-55' in mysettings.features
                        for f in os.listdir(pkgdir):
                                pf = None
-                               if glep55:
-                                       pf, eapi = _split_ebuild_name_glep55(f)
-                               elif f[-7:] == '.ebuild':
+                               if f[-7:] == '.ebuild':
                                        pf = f[:-7]
                                if pf is not None and not mf.hasFile("EBUILD", f):
                                        f = os.path.join(pkgdir, f)