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:
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.
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(
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:
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):
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(
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]
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:
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):
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"
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()))
__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
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") % \
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, \
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)
# 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)