From: Daniel Robbins Date: Tue, 6 Jul 2010 20:29:04 +0000 (-0600) Subject: GLEP 55 removal X-Git-Tag: v2.2_rc68~538 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e073799b25483d6b059063a8c7969c8c2406ff0b;p=portage.git GLEP 55 removal --- diff --git a/bin/ebuild b/bin/ebuild index 7d543a109..08a68f100 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -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: diff --git a/man/make.conf.5 b/man/make.conf.5 index 1546aae3a..b033e7ac0 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -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. diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py index 43d715949..77499a055 100644 --- a/pym/_emerge/EbuildMetadataPhase.py +++ b/pym/_emerge/EbuildMetadataPhase.py @@ -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( diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 764c97466..68b99de6c 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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: diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index cbbb290f8..238db8319 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -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: diff --git a/pym/portage/manifest.py b/pym/portage/manifest.py index a2a65aaf8..ec801a355 100644 --- a/pym/portage/manifest.py +++ b/pym/portage/manifest.py @@ -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" diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 57bbdd5dd..4cded99c9 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -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())) diff --git a/pym/portage/package/ebuild/digestcheck.py b/pym/portage/package/ebuild/digestcheck.py index 906bb4a57..6861e3f9d 100644 --- a/pym/portage/package/ebuild/digestcheck.py +++ b/pym/portage/package/ebuild/digestcheck.py @@ -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") % \ diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 531cb2386..b6eedd416 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -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)