diff options
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/__init__.py | 14 | ||||
-rw-r--r-- | pym/portage/dbapi/porttree.py | 40 | ||||
-rw-r--r-- | pym/portage/manifest.py | 8 | ||||
-rw-r--r-- | pym/portage/package/ebuild/config.py | 4 | ||||
-rw-r--r-- | pym/portage/package/ebuild/digestcheck.py | 7 | ||||
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 13 |
6 files changed, 12 insertions, 74 deletions
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) |