summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-08-29 13:23:22 -0700
committerZac Medico <zmedico@gentoo.org>2012-08-29 13:23:22 -0700
commit78ba7f0d3a3a2defdf9807ef2e8138965490a2fc (patch)
tree10a549acf3569d3104291e38927cd8318318da09
parent9f14ed80e65a18da06e0834961ea032e3e830319 (diff)
downloadportage-78ba7f0d3a3a2defdf9807ef2e8138965490a2fc.tar.gz
portage-78ba7f0d3a3a2defdf9807ef2e8138965490a2fc.tar.bz2
portage-78ba7f0d3a3a2defdf9807ef2e8138965490a2fc.zip
Rename slot-abi stuff to refer to slot-operator.
This makes it consistent with the language in the PMS eapi-5 branch: http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=commit;h=5d6749ac9e5ddc5b1daaad7737b65fa81c6ece47
-rw-r--r--NEWS4
-rw-r--r--doc/package/ebuild/eapi/4-slot-abi.docbook12
-rw-r--r--man/emerge.116
-rw-r--r--pym/_emerge/FakeVartree.py20
-rw-r--r--pym/_emerge/Package.py4
-rw-r--r--pym/_emerge/Scheduler.py6
-rw-r--r--pym/_emerge/create_depgraph_params.py20
-rw-r--r--pym/_emerge/depgraph.py102
-rw-r--r--pym/_emerge/main.py16
-rw-r--r--pym/_emerge/resolver/backtracking.py16
-rw-r--r--pym/_emerge/resolver/slot_collision.py4
-rw-r--r--pym/portage/dbapi/__init__.py6
-rw-r--r--pym/portage/dep/__init__.py94
-rw-r--r--pym/portage/dep/_slot_abi.py24
-rw-r--r--pym/portage/eapi.py6
-rw-r--r--pym/portage/package/ebuild/doebuild.py8
-rw-r--r--pym/portage/tests/dep/testAtom.py16
-rw-r--r--pym/portage/tests/dep/test_match_from_list.py6
-rw-r--r--pym/portage/tests/resolver/test_complete_graph.py4
-rw-r--r--pym/portage/tests/resolver/test_slot_abi.py26
-rw-r--r--pym/portage/tests/resolver/test_slot_abi_downgrade.py8
-rw-r--r--pym/portage/versions.py10
22 files changed, 214 insertions, 214 deletions
diff --git a/NEWS b/NEWS
index 9a2f24f6d..b294fa563 100644
--- a/NEWS
+++ b/NEWS
@@ -15,8 +15,8 @@ portage-2.1.11
* Add support for experimental EAPI "4-slot-abi". Refer to the corresponding
html documentation that is installed with USE=doc, and also to the emerge(1)
- man page for information about the related --ignore-built-slot-abi-deps and
- --rebuild-if-new-slot-abi options.
+ man page for information about the related --ignore-built-slot-operator-deps and
+ --rebuild-if-new-slot options.
portage-2.1.10
-------------
diff --git a/doc/package/ebuild/eapi/4-slot-abi.docbook b/doc/package/ebuild/eapi/4-slot-abi.docbook
index 696d0bf74..08e2cef75 100644
--- a/doc/package/ebuild/eapi/4-slot-abi.docbook
+++ b/doc/package/ebuild/eapi/4-slot-abi.docbook
@@ -28,12 +28,12 @@ Refer to the
</para>
</section>
<section id='package-ebuild-eapi-4-slot-abi-metadata-dependency-atom-slot-abi-equal-operator'>
-<title>Dependency Atom SLOT/ABI := Operator</title>
+<title>Dependency Atom slot/sub-slot := Operator</title>
<para>
-Dependency atom syntax now supports SLOT/ABI := operators which allow the
-specific SLOT/ABI that a package is built against to be recorded, so that it's
+Dependency atom syntax now supports slot/sub-slot := operators which allow the
+specific slot/sub-slot that a package is built against to be recorded, so that it's
possible to automatically determine when a package needs to be rebuilt due to
-having a dependency upgraded to a different SLOT/ABI.
+having a dependency upgraded to a different slot/sub-slot.
</para>
<para>
For example, if a package is built
@@ -50,13 +50,13 @@ not contain a sub-slot part, the sub-slot is considered to be implicitly equal
to "4.8".
</para>
<para>
-When dependencies are rewritten as described above, the SLOT/ABI recorded in
+When dependencies are rewritten as described above, the slot/sub-slot recorded in
the atom is always equal to that of the highest matched version that is
installed at build time.
</para>
</section>
<section id='package-ebuild-eapi-4-slot-abi-metadata-dependency-atom-slot-abi-asterisk-operator'>
-<title>Dependency Atom SLOT/ABI :* Operator</title>
+<title>Dependency Atom slot/sub-slot :* Operator</title>
<para>
The new :* operator is used to express dependencies that can change versions
at runtime without requiring reverse dependencies to be rebuilt. For example,
diff --git a/man/emerge.1 b/man/emerge.1
index 7aa46226c..36e346996 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -485,12 +485,12 @@ remote server are preferred over local packages if they are not identical.
.BR "\-\-ignore-default-opts"
Causes \fIEMERGE_DEFAULT_OPTS\fR (see \fBmake.conf\fR(5)) to be ignored.
.TP
-.BR "\-\-ignore\-built\-slot\-abi\-deps < y | n >"
-Ignore the SLOT/ABI := operator parts of dependencies that have
+.BR "\-\-ignore\-built\-slot\-operator\-deps < y | n >"
+Ignore the slot/sub\-slot := operator parts of dependencies that have
been recorded when packages where built. This option is intended
only for debugging purposes, and it only affects built packages
-that specify SLOT/ABI := operator dependencies using the
-experimental "4\-slot\-abi" EAPI.
+that specify slot/sub\-slot := operator dependencies using the
+experimental "4\-slot\-abi" or "5_pre1" EAPIs.
.TP
.BR "-j [JOBS], \-\-jobs[=JOBS]"
Specifies the number of packages to build simultaneously. If this option is
@@ -645,13 +645,13 @@ Disable the warning message that's shown prior to
to be set in the \fBmake.conf\fR(5)
\fBEMERGE_DEFAULT_OPTS\fR variable.
.TP
-.BR "\-\-rebuild\-if\-new\-slot\-abi [ y | n ]"
-Automatically rebuild or reinstall packages when SLOT/ABI :=
+.BR "\-\-rebuild\-if\-new\-slot [ y | n ]"
+Automatically rebuild or reinstall packages when slot/sub\-slot :=
operator dependencies can be satisfied by a newer slot, so that
older packages slots will become eligible for removal by the
\-\-depclean action as soon as possible. This option only
-affects packages that specify SLOT/ABI dependencies using the
-experimental "4\-slot\-abi" EAPI. Since this option requires
+affects packages that specify slot/sub\-slot := dependencies using the
+experimental "4\-slot\-abi" or "5_pre1" EAPIs. Since this option requires
checking of reverse dependencies, it enables \-\-complete\-graph
mode whenever a new slot is installed. This option is enabled by
default.
diff --git a/pym/_emerge/FakeVartree.py b/pym/_emerge/FakeVartree.py
index ce15f5a36..386501586 100644
--- a/pym/_emerge/FakeVartree.py
+++ b/pym/_emerge/FakeVartree.py
@@ -10,7 +10,7 @@ from _emerge.Package import Package
from _emerge.PackageVirtualDbapi import PackageVirtualDbapi
from portage.const import VDB_PATH
from portage.dbapi.vartree import vartree
-from portage.dep._slot_abi import find_built_slot_abi_atoms
+from portage.dep._slot_abi import find_built_slot_operator_atoms
from portage.eapi import _get_eapi_attrs
from portage.exception import InvalidDependString
from portage.repository.config import _gen_valid_repo
@@ -45,10 +45,10 @@ class FakeVartree(vartree):
is not a matching ebuild in the tree). Instances of this class are not
populated until the sync() method is called."""
def __init__(self, root_config, pkg_cache=None, pkg_root_config=None,
- dynamic_deps=True, ignore_built_slot_abi_deps=False):
+ dynamic_deps=True, ignore_built_slot_operator_deps=False):
self._root_config = root_config
self._dynamic_deps = dynamic_deps
- self._ignore_built_slot_abi_deps = ignore_built_slot_abi_deps
+ self._ignore_built_slot_operator_deps = ignore_built_slot_operator_deps
if pkg_root_config is None:
pkg_root_config = self._root_config
self._pkg_root_config = pkg_root_config
@@ -112,11 +112,11 @@ class FakeVartree(vartree):
installed_eapi = pkg_obj.metadata['EAPI']
repo = pkg_obj.metadata['repository']
eapi_attrs = _get_eapi_attrs(installed_eapi)
- built_slot_abi_atoms = None
+ built_slot_operator_atoms = None
- if eapi_attrs.slot_abi and not self._ignore_built_slot_abi_deps:
+ if eapi_attrs.slot_operator and not self._ignore_built_slot_operator_deps:
try:
- built_slot_abi_atoms = find_built_slot_abi_atoms(pkg_obj)
+ built_slot_operator_atoms = find_built_slot_operator_atoms(pkg_obj)
except InvalidDependString:
pass
@@ -137,12 +137,12 @@ class FakeVartree(vartree):
portage.eapi_is_supported(installed_eapi)):
raise KeyError(pkg)
- # preserve built SLOT/ABI := operator deps
- if built_slot_abi_atoms:
+ # preserve built slot/sub-slot := operator deps
+ if built_slot_operator_atoms:
live_eapi_attrs = _get_eapi_attrs(live_metadata["EAPI"])
- if not live_eapi_attrs.slot_abi:
+ if not live_eapi_attrs.slot_operator:
raise KeyError(pkg)
- for k, v in built_slot_abi_atoms.items():
+ for k, v in built_slot_operator_atoms.items():
live_metadata[k] += (" " +
" ".join(_unicode(atom) for atom in v))
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index ce51a8b06..957d5d399 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -29,7 +29,7 @@ class Package(Task):
"root_config", "type_name",
"category", "counter", "cp", "cpv_split",
"inherited", "iuse", "mtime",
- "pf", "root", "slot", "slot_abi", "slot_atom", "version") + \
+ "pf", "root", "slot", "sub_slot", "slot_atom", "version") + \
("_invalid", "_raw_metadata", "_masks", "_use",
"_validated_atoms", "_visible")
@@ -61,7 +61,7 @@ class Package(Task):
"SLOT: invalid value: '%s'" % self.metadata["SLOT"])
self.cp = self.cpv.cp
self.slot = self.cpv.slot
- self.slot_abi = self.cpv.slot_abi
+ self.sub_slot = self.cpv.sub_slot
# sync metadata with validated repo (may be UNKNOWN_REPO)
self.metadata['repository'] = self.cpv.repo
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index d40cedd7b..8ee9a5841 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -328,15 +328,15 @@ class Scheduler(PollScheduler):
self._set_graph_config(graph_config)
self._blocker_db = {}
dynamic_deps = self.myopts.get("--dynamic-deps", "y") != "n"
- ignore_built_slot_abi_deps = self.myopts.get(
- "--ignore-built-slot-abi-deps", "n") == "y"
+ ignore_built_slot_operator_deps = self.myopts.get(
+ "--ignore-built-slot-operator-deps", "n") == "y"
for root in self.trees:
if self._uninstall_only:
continue
if graph_config is None:
fake_vartree = FakeVartree(self.trees[root]["root_config"],
pkg_cache=self._pkg_cache, dynamic_deps=dynamic_deps,
- ignore_built_slot_abi_deps=ignore_built_slot_abi_deps)
+ ignore_built_slot_operator_deps=ignore_built_slot_operator_deps)
fake_vartree.sync()
else:
fake_vartree = graph_config.trees[root]['vartree']
diff --git a/pym/_emerge/create_depgraph_params.py b/pym/_emerge/create_depgraph_params.py
index 2838e93c3..98a76460c 100644
--- a/pym/_emerge/create_depgraph_params.py
+++ b/pym/_emerge/create_depgraph_params.py
@@ -15,11 +15,11 @@ def create_depgraph_params(myopts, myaction):
# complete: completely account for all known dependencies
# remove: build graph for use in removing packages
# rebuilt_binaries: replace installed packages with rebuilt binaries
- # rebuild_if_new_slot_abi: rebuild or reinstall packages when
- # SLOT/ABI := operator dependencies can be satisfied by a newer
- # SLOT/ABI, so that older packages slots will become eligible for
+ # rebuild_if_new_slot: rebuild or reinstall packages when
+ # slot/sub-slot := operator dependencies can be satisfied by a newer
+ # slot/sub-slot, so that older packages slots will become eligible for
# removal by the --depclean action as soon as possible
- # ignore_built_slot_abi_deps: ignore the SLOT/ABI := operator parts
+ # ignore_built_slot_operator_deps: ignore the slot/sub-slot := operator parts
# of dependencies that have been recorded when packages where built
myparams = {"recurse" : True}
@@ -27,9 +27,9 @@ def create_depgraph_params(myopts, myaction):
if bdeps is not None:
myparams["bdeps"] = bdeps
- ignore_built_slot_abi_deps = myopts.get("--ignore-built-slot-abi-deps")
- if ignore_built_slot_abi_deps is not None:
- myparams["ignore_built_slot_abi_deps"] = ignore_built_slot_abi_deps
+ ignore_built_slot_operator_deps = myopts.get("--ignore-built-slot-operator-deps")
+ if ignore_built_slot_operator_deps is not None:
+ myparams["ignore_built_slot_operator_deps"] = ignore_built_slot_operator_deps
dynamic_deps = myopts.get("--dynamic-deps")
if dynamic_deps is not None:
@@ -41,9 +41,9 @@ def create_depgraph_params(myopts, myaction):
myparams["selective"] = True
return myparams
- rebuild_if_new_slot_abi = myopts.get('--rebuild-if-new-slot-abi')
- if rebuild_if_new_slot_abi is not None:
- myparams['rebuild_if_new_slot_abi'] = rebuild_if_new_slot_abi
+ rebuild_if_new_slot = myopts.get('--rebuild-if-new-slot')
+ if rebuild_if_new_slot is not None:
+ myparams['rebuild_if_new_slot'] = rebuild_if_new_slot
if "--update" in myopts or \
"--newuse" in myopts or \
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 5c49e6989..7df93e194 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -22,7 +22,7 @@ from portage.dbapi.dep_expand import dep_expand
from portage.dep import Atom, best_match_to_list, extract_affecting_use, \
check_required_use, human_readable_required_use, match_from_list, \
_repo_separator
-from portage.dep._slot_abi import ignore_built_slot_abi_deps
+from portage.dep._slot_abi import ignore_built_slot_operator_deps
from portage.eapi import eapi_has_strong_blocks, eapi_has_required_use
from portage.exception import (InvalidAtom, InvalidDependString,
PackageNotFound, PortageException)
@@ -115,8 +115,8 @@ class _frozen_depgraph_config(object):
self._pkg_cache = {}
self._highest_license_masked = {}
dynamic_deps = myopts.get("--dynamic-deps", "y") != "n"
- ignore_built_slot_abi_deps = myopts.get(
- "--ignore-built-slot-abi-deps", "n") == "y"
+ ignore_built_slot_operator_deps = myopts.get(
+ "--ignore-built-slot-operator-deps", "n") == "y"
for myroot in trees:
self.trees[myroot] = {}
# Create a RootConfig instance that references
@@ -132,7 +132,7 @@ class _frozen_depgraph_config(object):
pkg_cache=self._pkg_cache,
pkg_root_config=self.roots[myroot],
dynamic_deps=dynamic_deps,
- ignore_built_slot_abi_deps=ignore_built_slot_abi_deps)
+ ignore_built_slot_operator_deps=ignore_built_slot_operator_deps)
self.pkgsettings[myroot] = portage.config(
clone=self.trees[myroot]["vartree"].settings)
@@ -412,7 +412,7 @@ class _dynamic_depgraph_config(object):
self._needed_license_changes = backtrack_parameters.needed_license_changes
self._needed_use_config_changes = backtrack_parameters.needed_use_config_changes
self._runtime_pkg_mask = backtrack_parameters.runtime_pkg_mask
- self._slot_abi_replace_installed = backtrack_parameters.slot_abi_replace_installed
+ self._slot_operator_replace_installed = backtrack_parameters.slot_operator_replace_installed
self._need_restart = False
# For conditions that always require user intervention, such as
# unsatisfied REQUIRED_USE (currently has no autounmask support).
@@ -423,7 +423,7 @@ class _dynamic_depgraph_config(object):
self._success_without_autounmask = False
self._traverse_ignored_deps = False
self._complete_mode = False
- self._slot_abi_deps = {}
+ self._slot_operator_deps = {}
for myroot in depgraph._frozen_config.trees:
self.sets[myroot] = _depgraph_sets()
@@ -956,7 +956,7 @@ class depgraph(object):
def _slot_conflict_backtrack_abi(self, pkg, slot_nodes, conflict_atoms):
"""
- If one or more conflict atoms have a SLOT/ABI dep that can be resolved
+ If one or more conflict atoms have a slot/sub-slot dep that can be resolved
by rebuilding the parent package, then schedule the rebuild via
backtracking, and return True. Otherwise, return False.
"""
@@ -964,7 +964,7 @@ class depgraph(object):
found_update = False
for parent_atom, conflict_pkgs in conflict_atoms.items():
parent, atom = parent_atom
- if atom.slot_abi_op != "=" or not parent.built:
+ if atom.slot_operator != "=" or not parent.built:
continue
if pkg not in conflict_pkgs:
@@ -977,13 +977,13 @@ class depgraph(object):
dep = Dependency(atom=atom, child=other_pkg,
parent=parent, root=pkg.root)
- if self._slot_abi_update_probe(dep):
- self._slot_abi_update_backtrack(dep)
+ if self._slot_operator_update_probe(dep):
+ self._slot_operator_update_backtrack(dep)
found_update = True
return found_update
- def _slot_abi_update_backtrack(self, dep, new_child_slot=None):
+ def _slot_operator_update_backtrack(self, dep, new_child_slot=None):
if new_child_slot is None:
child = dep.child
else:
@@ -1008,11 +1008,11 @@ class depgraph(object):
abi_masks = {}
if new_child_slot is None:
if not child.installed:
- abi_masks.setdefault(child, {})["slot_abi_mask_built"] = None
+ abi_masks.setdefault(child, {})["slot_operator_mask_built"] = None
if not dep.parent.installed:
- abi_masks.setdefault(dep.parent, {})["slot_abi_mask_built"] = None
+ abi_masks.setdefault(dep.parent, {})["slot_operator_mask_built"] = None
if abi_masks:
- config.setdefault("slot_abi_mask_built", {}).update(abi_masks)
+ config.setdefault("slot_operator_mask_built", {}).update(abi_masks)
# trigger replacement of installed packages if necessary
abi_reinstalls = set()
@@ -1021,15 +1021,15 @@ class depgraph(object):
if new_child_slot is None and child.installed:
abi_reinstalls.add((child.root, child.slot_atom))
if abi_reinstalls:
- config.setdefault("slot_abi_replace_installed",
+ config.setdefault("slot_operator_replace_installed",
set()).update(abi_reinstalls)
self._dynamic_config._need_restart = True
- def _slot_abi_update_probe(self, dep, new_child_slot=False):
+ def _slot_operator_update_probe(self, dep, new_child_slot=False):
"""
- SLOT/ABI := operators tend to prevent updates from getting pulled in,
- since installed packages pull in packages with the SLOT/ABI that they
+ slot/sub-slot := operators tend to prevent updates from getting pulled in,
+ since installed packages pull in packages with the slot/sub-slot that they
were built against. Detect this case so that we can schedule rebuilds
and reinstalls when appropriate.
NOTE: This function only searches for updates that involve upgrades
@@ -1054,7 +1054,7 @@ class depgraph(object):
dep.parent.slot_atom):
for atom in replacement_parent.validated_atoms:
- if not atom.slot_abi_op == "=" or \
+ if not atom.slot_operator == "=" or \
atom.blocker or \
atom.cp != dep.atom.cp:
continue
@@ -1074,8 +1074,8 @@ class depgraph(object):
for pkg in self._iter_similar_available(
dep.child, atom):
if pkg.slot == dep.child.slot and \
- pkg.slot_abi == dep.child.slot_abi:
- # If SLOT/ABI is identical, then there's
+ pkg.sub_slot == dep.child.sub_slot:
+ # If slot/sub-slot is identical, then there's
# no point in updating.
continue
if new_child_slot:
@@ -1093,7 +1093,7 @@ class depgraph(object):
want_downgrade = self._downgrade_probe(dep.child)
# be careful not to trigger a rebuild when
# the only version available with a
- # different slot_abi is an older version
+ # different slot_operator is an older version
if not want_downgrade:
continue
@@ -1101,7 +1101,7 @@ class depgraph(object):
msg = []
msg.append("")
msg.append("")
- msg.append("slot_abi_update_probe:")
+ msg.append("slot_operator_update_probe:")
msg.append(" existing child package: %s" % dep.child)
msg.append(" existing parent package: %s" % dep.parent)
msg.append(" new child package: %s" % pkg)
@@ -1116,7 +1116,7 @@ class depgraph(object):
msg = []
msg.append("")
msg.append("")
- msg.append("slot_abi_update_probe:")
+ msg.append("slot_operator_update_probe:")
msg.append(" existing child package: %s" % dep.child)
msg.append(" existing parent package: %s" % dep.parent)
msg.append(" new child package: %s" % None)
@@ -1178,16 +1178,16 @@ class depgraph(object):
continue
yield pkg
- def _slot_abi_trigger_reinstalls(self):
+ def _slot_operator_trigger_reinstalls(self):
"""
- Search for packages with slot-abi deps on older slots, and schedule
+ Search for packages with slot-operator deps on older slots, and schedule
rebuilds if they can link to a newer slot that's in the graph.
"""
- rebuild_if_new_slot_abi = self._dynamic_config.myparams.get(
- "rebuild_if_new_slot_abi", "y") == "y"
+ rebuild_if_new_slot = self._dynamic_config.myparams.get(
+ "rebuild_if_new_slot", "y") == "y"
- for slot_key, slot_info in self._dynamic_config._slot_abi_deps.items():
+ for slot_key, slot_info in self._dynamic_config._slot_operator_deps.items():
for dep in slot_info:
if not (dep.child.built and dep.parent and
@@ -1197,17 +1197,17 @@ class depgraph(object):
# Check for slot update first, since we don't want to
# trigger reinstall of the child package when a newer
# slot will be used instead.
- if rebuild_if_new_slot_abi:
- new_child = self._slot_abi_update_probe(dep,
+ if rebuild_if_new_slot:
+ new_child = self._slot_operator_update_probe(dep,
new_child_slot=True)
if new_child:
- self._slot_abi_update_backtrack(dep,
+ self._slot_operator_update_backtrack(dep,
new_child_slot=new_child)
break
if dep.want_update:
- if self._slot_abi_update_probe(dep):
- self._slot_abi_update_backtrack(dep)
+ if self._slot_operator_update_probe(dep):
+ self._slot_operator_update_backtrack(dep)
break
def _reinstall_for_flags(self, pkg, forced_flags,
@@ -1614,8 +1614,8 @@ class depgraph(object):
dep.child = pkg
if (not pkg.onlydeps and pkg.built and
- dep.atom and dep.atom.slot_abi_built):
- self._add_slot_abi_dep(dep)
+ dep.atom and dep.atom.slot_operator_built):
+ self._add_slot_operator_dep(dep)
recurse = deep is True or depth + 1 <= deep
dep_stack = self._dynamic_config._dep_stack
@@ -1648,12 +1648,12 @@ class depgraph(object):
self._dynamic_config._parent_atoms[pkg] = parent_atoms
parent_atoms.add(parent_atom)
- def _add_slot_abi_dep(self, dep):
+ def _add_slot_operator_dep(self, dep):
slot_key = (dep.root, dep.child.slot_atom)
- slot_info = self._dynamic_config._slot_abi_deps.get(slot_key)
+ slot_info = self._dynamic_config._slot_operator_deps.get(slot_key)
if slot_info is None:
slot_info = []
- self._dynamic_config._slot_abi_deps[slot_key] = slot_info
+ self._dynamic_config._slot_operator_deps[slot_key] = slot_info
slot_info.append(dep)
def _add_slot_conflict(self, pkg):
@@ -2106,12 +2106,12 @@ class depgraph(object):
# Yield ~, =*, < and <= atoms first, since those are more likely to
# cause slot conflicts, and we want those atoms to be displayed
# in the resulting slot conflict message (see bug #291142).
- # Give similar treatment to SLOT/ABI atoms.
+ # Give similar treatment to slot/sub-slot atoms.
conflict_atoms = []
normal_atoms = []
abi_atoms = []
for atom in cp_atoms:
- if atom.slot_abi_built:
+ if atom.slot_operator_built:
abi_atoms.append(atom)
continue
conflict = False
@@ -2553,8 +2553,8 @@ class depgraph(object):
atom_list.append((root, '__auto_rebuild__', atom))
for root, atom in self._rebuild.reinstall_list:
atom_list.append((root, '__auto_reinstall__', atom))
- for root, atom in self._dynamic_config._slot_abi_replace_installed:
- atom_list.append((root, '__auto_slot_abi_replace_installed__', atom))
+ for root, atom in self._dynamic_config._slot_operator_replace_installed:
+ atom_list.append((root, '__auto_slot_operator_replace_installed__', atom))
set_dict = {}
for root, set_name, atom in atom_list:
@@ -2708,8 +2708,8 @@ class depgraph(object):
return False, myfavorites
if "config" in self._dynamic_config._backtrack_infos and \
- ("slot_abi_mask_built" in self._dynamic_config._backtrack_infos["config"] or
- "slot_abi_replace_installed" in self._dynamic_config._backtrack_infos["config"]) and \
+ ("slot_operator_mask_built" in self._dynamic_config._backtrack_infos["config"] or
+ "slot_operator_replace_installed" in self._dynamic_config._backtrack_infos["config"]) and \
self.need_restart():
return False, myfavorites
@@ -2899,9 +2899,9 @@ class depgraph(object):
is_valid_flag=is_valid_flag, eapi=eapi)
if (self._dynamic_config.myparams.get(
- "ignore_built_slot_abi_deps", "n") == "y" and
+ "ignore_built_slot_operator_deps", "n") == "y" and
parent and parent.built):
- ignore_built_slot_abi_deps(depstring)
+ ignore_built_slot_operator_deps(depstring)
pkgsettings = self._frozen_config.pkgsettings[root]
if trees is None:
@@ -4660,9 +4660,9 @@ class depgraph(object):
"complete_if_new_use", "y") == "y"
complete_if_new_ver = self._dynamic_config.myparams.get(
"complete_if_new_ver", "y") == "y"
- rebuild_if_new_slot_abi = self._dynamic_config.myparams.get(
- "rebuild_if_new_slot_abi", "y") == "y"
- complete_if_new_slot = rebuild_if_new_slot_abi
+ rebuild_if_new_slot = self._dynamic_config.myparams.get(
+ "rebuild_if_new_slot", "y") == "y"
+ complete_if_new_slot = rebuild_if_new_slot
if "complete" not in self._dynamic_config.myparams and \
(complete_if_new_use or
@@ -5346,7 +5346,7 @@ class depgraph(object):
self._process_slot_conflicts()
- self._slot_abi_trigger_reinstalls()
+ self._slot_operator_trigger_reinstalls()
if not self._validate_blockers():
self._dynamic_config._skip_restart = True
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index d4b2901e3..049c3ec88 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -478,7 +478,7 @@ def insert_optional_args(args):
'--package-moves' : y_or_n,
'--quiet' : y_or_n,
'--quiet-build' : y_or_n,
- '--rebuild-if-new-slot-abi': y_or_n,
+ '--rebuild-if-new-slot': y_or_n,
'--rebuild-if-new-rev' : y_or_n,
'--rebuild-if-new-ver' : y_or_n,
'--rebuild-if-unbuilt' : y_or_n,
@@ -754,11 +754,11 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n
},
- "--ignore-built-slot-abi-deps": {
- "help": "Ignore the SLOT/ABI := operator parts of dependencies that have "
+ "--ignore-built-slot-operator-deps": {
+ "help": "Ignore the slot/sub-slot := operator parts of dependencies that have "
"been recorded when packages where built. This option is intended "
"only for debugging purposes, and it only affects built packages "
- "that specify SLOT/ABI := operator dependencies using the "
+ "that specify slot/sub-slot := operator dependencies using the "
"experimental \"4-slot-abi\" EAPI.",
"type": "choice",
"choices": y_or_n
@@ -877,8 +877,8 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n,
},
- "--rebuild-if-new-slot-abi": {
- "help" : ("Automatically rebuild or reinstall packages when SLOT/ABI := "
+ "--rebuild-if-new-slot": {
+ "help" : ("Automatically rebuild or reinstall packages when slot/sub-slot := "
"operator dependencies can be satisfied by a newer slot, so that "
"older packages slots will become eligible for removal by the "
"--depclean action as soon as possible."),
@@ -1127,8 +1127,8 @@ def parse_opts(tmpcmdline, silent=False):
if myoptions.quiet_build in true_y:
myoptions.quiet_build = 'y'
- if myoptions.rebuild_if_new_slot_abi in true_y:
- myoptions.rebuild_if_new_slot_abi = 'y'
+ if myoptions.rebuild_if_new_slot in true_y:
+ myoptions.rebuild_if_new_slot = 'y'
if myoptions.rebuild_if_new_ver in true_y:
myoptions.rebuild_if_new_ver = True
diff --git a/pym/_emerge/resolver/backtracking.py b/pym/_emerge/resolver/backtracking.py
index d8f49c679..5456ea455 100644
--- a/pym/_emerge/resolver/backtracking.py
+++ b/pym/_emerge/resolver/backtracking.py
@@ -8,7 +8,7 @@ class BacktrackParameter(object):
__slots__ = (
"needed_unstable_keywords", "runtime_pkg_mask", "needed_use_config_changes", "needed_license_changes",
"rebuild_list", "reinstall_list", "needed_p_mask_changes",
- "slot_abi_replace_installed"
+ "slot_operator_replace_installed"
)
def __init__(self):
@@ -19,7 +19,7 @@ class BacktrackParameter(object):
self.needed_license_changes = {}
self.rebuild_list = set()
self.reinstall_list = set()
- self.slot_abi_replace_installed = set()
+ self.slot_operator_replace_installed = set()
def __deepcopy__(self, memo=None):
if memo is None:
@@ -35,7 +35,7 @@ class BacktrackParameter(object):
result.needed_license_changes = copy.copy(self.needed_license_changes)
result.rebuild_list = copy.copy(self.rebuild_list)
result.reinstall_list = copy.copy(self.reinstall_list)
- result.slot_abi_replace_installed = copy.copy(self.slot_abi_replace_installed)
+ result.slot_operator_replace_installed = copy.copy(self.slot_operator_replace_installed)
# runtime_pkg_mask contains nested dicts that must also be copied
result.runtime_pkg_mask = {}
@@ -52,7 +52,7 @@ class BacktrackParameter(object):
self.needed_license_changes == other.needed_license_changes and \
self.rebuild_list == other.rebuild_list and \
self.reinstall_list == other.reinstall_list and \
- self.slot_abi_replace_installed == other.slot_abi_replace_installed
+ self.slot_operator_replace_installed == other.slot_operator_replace_installed
class _BacktrackNode(object):
@@ -125,7 +125,7 @@ class Backtracker(object):
for pkg, mask_info in runtime_pkg_mask.items():
if "missing dependency" in mask_info or \
- "slot_abi_mask_built" in mask_info:
+ "slot_operator_mask_built" in mask_info:
continue
entry_is_valid = False
@@ -192,12 +192,12 @@ class Backtracker(object):
para.needed_use_config_changes[pkg] = (new_use, new_changes)
elif change == "slot_conflict_abi":
new_node.terminal = False
- elif change == "slot_abi_mask_built":
+ elif change == "slot_operator_mask_built":
for pkg, mask_reasons in data.items():
para.runtime_pkg_mask.setdefault(pkg,
{}).update(mask_reasons)
- elif change == "slot_abi_replace_installed":
- para.slot_abi_replace_installed.update(data)
+ elif change == "slot_operator_replace_installed":
+ para.slot_operator_replace_installed.update(data)
elif change == "rebuild_list":
para.rebuild_list.update(data)
elif change == "reinstall_list":
diff --git a/pym/_emerge/resolver/slot_collision.py b/pym/_emerge/resolver/slot_collision.py
index 783a6483d..bc95e916e 100644
--- a/pym/_emerge/resolver/slot_collision.py
+++ b/pym/_emerge/resolver/slot_collision.py
@@ -291,8 +291,8 @@ class slot_conflict_handler(object):
num_all_specific_atoms += 1
collision_reasons[key] = atoms
else:
- # The slot_abi does not match.
- key = ("sub-slot", atom.slot_abi)
+ # The sub_slot does not match.
+ key = ("sub-slot", atom.sub_slot)
atoms = collision_reasons.get(key, set())
atoms.add((ppkg, atom, other_pkg))
num_all_specific_atoms += 1
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py
index f326e6828..dc0a3da68 100644
--- a/pym/portage/dbapi/__init__.py
+++ b/pym/portage/dbapi/__init__.py
@@ -348,9 +348,9 @@ class dbapi(object):
continue
moves += 1
if "/" not in newslot and \
- mycpv.slot_abi and \
- mycpv.slot_abi not in (mycpv.slot, newslot):
- newslot = "%s/%s" % (newslot, mycpv.slot_abi)
+ mycpv.sub_slot and \
+ mycpv.sub_slot not in (mycpv.slot, newslot):
+ newslot = "%s/%s" % (newslot, mycpv.sub_slot)
mydata = {"SLOT": newslot+"\n"}
self.aux_update(mycpv, mydata)
return moves
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index b7bb46f75..4d85f945b 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -62,12 +62,12 @@ _extended_cat = r'[\w+*][\w+.*-]*'
_slot_re_cache = {}
def _get_slot_re(eapi_attrs):
- cache_key = eapi_attrs.slot_abi
+ cache_key = eapi_attrs.slot_operator
slot_re = _slot_re_cache.get(cache_key)
if slot_re is not None:
return slot_re
- if eapi_attrs.slot_abi:
+ if eapi_attrs.slot_operator:
slot_re = _slot + r'(/' + _slot + r'=?)?'
else:
slot_re = _slot
@@ -80,12 +80,12 @@ def _get_slot_re(eapi_attrs):
_slot_dep_re_cache = {}
def _get_slot_dep_re(eapi_attrs):
- cache_key = eapi_attrs.slot_abi
+ cache_key = eapi_attrs.slot_operator
slot_re = _slot_dep_re_cache.get(cache_key)
if slot_re is not None:
return slot_re
- if eapi_attrs.slot_abi:
+ if eapi_attrs.slot_operator:
slot_re = _slot + r'?(\*|=|/' + _slot + r'=?)?'
else:
slot_re = _slot
@@ -97,9 +97,9 @@ def _get_slot_dep_re(eapi_attrs):
def _match_slot(atom, pkg):
if pkg.slot == atom.slot:
- if not atom.slot_abi:
+ if not atom.sub_slot:
return True
- elif atom.slot_abi == pkg.slot_abi:
+ elif atom.sub_slot == pkg.sub_slot:
return True
return False
@@ -1311,32 +1311,32 @@ class Atom(_unicode):
self.__dict__['repo'] = repo
if slot is None:
self.__dict__['slot'] = None
- self.__dict__['slot_abi'] = None
- self.__dict__['slot_abi_op'] = None
+ self.__dict__['sub_slot'] = None
+ self.__dict__['slot_operator'] = None
else:
slot_re = _get_slot_dep_re(eapi_attrs)
slot_match = slot_re.match(slot)
if slot_match is None:
raise InvalidAtom(self)
- if eapi_attrs.slot_abi:
+ if eapi_attrs.slot_operator:
self.__dict__['slot'] = slot_match.group(1)
- slot_abi = slot_match.group(2)
- if slot_abi is not None:
- slot_abi = slot_abi.lstrip("/")
- if slot_abi in ("*", "="):
- self.__dict__['slot_abi'] = None
- self.__dict__['slot_abi_op'] = slot_abi
+ sub_slot = slot_match.group(2)
+ if sub_slot is not None:
+ sub_slot = sub_slot.lstrip("/")
+ if sub_slot in ("*", "="):
+ self.__dict__['sub_slot'] = None
+ self.__dict__['slot_operator'] = sub_slot
else:
- slot_abi_op = None
- if slot_abi is not None and slot_abi[-1:] == "=":
- slot_abi_op = slot_abi[-1:]
- slot_abi = slot_abi[:-1]
- self.__dict__['slot_abi'] = slot_abi
- self.__dict__['slot_abi_op'] = slot_abi_op
+ slot_operator = None
+ if sub_slot is not None and sub_slot[-1:] == "=":
+ slot_operator = sub_slot[-1:]
+ sub_slot = sub_slot[:-1]
+ self.__dict__['sub_slot'] = sub_slot
+ self.__dict__['slot_operator'] = slot_operator
else:
self.__dict__['slot'] = slot
- self.__dict__['slot_abi'] = None
- self.__dict__['slot_abi_op'] = None
+ self.__dict__['sub_slot'] = None
+ self.__dict__['slot_operator'] = None
self.__dict__['operator'] = op
self.__dict__['extended_syntax'] = extended_syntax
@@ -1410,13 +1410,13 @@ class Atom(_unicode):
% (eapi, self), category='EAPI.incompatible')
@property
- def slot_abi_built(self):
+ def slot_operator_built(self):
"""
- Returns True if slot_abi_op == "=" and slot_abi is not None.
+ Returns True if slot_operator == "=" and sub_slot is not None.
NOTE: foo/bar:2= is unbuilt and returns False, whereas foo/bar:2/2=
is built and returns True.
"""
- return self.slot_abi_op == "=" and self.slot_abi is not None
+ return self.slot_operator == "=" and self.sub_slot is not None
@property
def without_repo(self):
@@ -1427,7 +1427,7 @@ class Atom(_unicode):
@property
def without_slot(self):
- if self.slot is None and self.slot_abi_op is None:
+ if self.slot is None and self.slot_operator is None:
return self
atom = remove_slot(self)
if self.repo is not None:
@@ -1439,14 +1439,14 @@ class Atom(_unicode):
def with_repo(self, repo):
atom = remove_slot(self)
- if self.slot is not None or self.slot_abi_op is not None:
+ if self.slot is not None or self.slot_operator is not None:
atom += _slot_separator
if self.slot is not None:
atom += self.slot
- if self.slot_abi is not None:
- atom += "/%s" % self.slot_abi
- if self.slot_abi_op is not None:
- atom += self.slot_abi_op
+ if self.sub_slot is not None:
+ atom += "/%s" % self.sub_slot
+ if self.slot_operator is not None:
+ atom += self.slot_operator
atom += _repo_separator + repo
if self.use is not None:
atom += _unicode(self.use)
@@ -1506,14 +1506,14 @@ class Atom(_unicode):
if not (self.use and self.use.conditional):
return self
atom = remove_slot(self)
- if self.slot is not None or self.slot_abi_op is not None:
+ if self.slot is not None or self.slot_operator is not None:
atom += _slot_separator
if self.slot is not None:
atom += self.slot
- if self.slot_abi is not None:
- atom += "/%s" % self.slot_abi
- if self.slot_abi_op is not None:
- atom += self.slot_abi_op
+ if self.sub_slot is not None:
+ atom += "/%s" % self.sub_slot
+ if self.slot_operator is not None:
+ atom += self.slot_operator
use_dep = self.use.evaluate_conditionals(use)
atom += _unicode(use_dep)
return Atom(atom, unevaluated_atom=self, allow_repo=(self.repo is not None), _use=use_dep)
@@ -1534,14 +1534,14 @@ class Atom(_unicode):
if not self.use:
return self
atom = remove_slot(self)
- if self.slot is not None or self.slot_abi_op is not None:
+ if self.slot is not None or self.slot_operator is not None:
atom += _slot_separator
if self.slot is not None:
atom += self.slot
- if self.slot_abi is not None:
- atom += "/%s" % self.slot_abi
- if self.slot_abi_op is not None:
- atom += self.slot_abi_op
+ if self.sub_slot is not None:
+ atom += "/%s" % self.sub_slot
+ if self.slot_operator is not None:
+ atom += self.slot_operator
use_dep = self.use.violated_conditionals(other_use, is_valid_flag, parent_use)
atom += _unicode(use_dep)
return Atom(atom, unevaluated_atom=self, allow_repo=(self.repo is not None), _use=use_dep)
@@ -1550,14 +1550,14 @@ class Atom(_unicode):
if not (self.use and self.use.conditional):
return self
atom = remove_slot(self)
- if self.slot is not None or self.slot_abi_op is not None:
+ if self.slot is not None or self.slot_operator is not None:
atom += _slot_separator
if self.slot is not None:
atom += self.slot
- if self.slot_abi is not None:
- atom += "/%s" % self.slot_abi
- if self.slot_abi_op is not None:
- atom += self.slot_abi_op
+ if self.sub_slot is not None:
+ atom += "/%s" % self.sub_slot
+ if self.slot_operator is not None:
+ atom += self.slot_operator
use_dep = self.use._eval_qa_conditionals(use_mask, use_force)
atom += _unicode(use_dep)
return Atom(atom, unevaluated_atom=self, allow_repo=(self.repo is not None), _use=use_dep)
diff --git a/pym/portage/dep/_slot_abi.py b/pym/portage/dep/_slot_abi.py
index 7c36e52dc..8a2b774a8 100644
--- a/pym/portage/dep/_slot_abi.py
+++ b/pym/portage/dep/_slot_abi.py
@@ -7,35 +7,35 @@ from portage.exception import InvalidData
_dep_keys = ('DEPEND', 'PDEPEND', 'RDEPEND')
_runtime_keys = ('PDEPEND', 'RDEPEND')
-def find_built_slot_abi_atoms(pkg):
+def find_built_slot_operator_atoms(pkg):
atoms = {}
for k in _dep_keys:
- atom_list = list(_find_built_slot_abi_op(use_reduce(pkg.metadata[k],
+ atom_list = list(_find_built_slot_operator(use_reduce(pkg.metadata[k],
uselist=pkg.use.enabled, eapi=pkg.metadata['EAPI'],
token_class=Atom)))
if atom_list:
atoms[k] = atom_list
return atoms
-def _find_built_slot_abi_op(dep_struct):
+def _find_built_slot_operator(dep_struct):
for x in dep_struct:
if isinstance(x, list):
- for atom in _find_built_slot_abi_op(x):
+ for atom in _find_built_slot_operator(x):
yield atom
- elif isinstance(x, Atom) and x.slot_abi_built:
+ elif isinstance(x, Atom) and x.slot_operator_built:
yield x
-def ignore_built_slot_abi_deps(dep_struct):
+def ignore_built_slot_operator_deps(dep_struct):
for i, x in enumerate(dep_struct):
if isinstance(x, list):
- ignore_built_slot_abi_deps(x)
- elif isinstance(x, Atom) and x.slot_abi_built:
+ ignore_built_slot_operator_deps(x)
+ elif isinstance(x, Atom) and x.slot_operator_built:
# There's no way of knowing here whether the SLOT
- # part of the SLOT/ABI pair should be kept, so we
+ # part of the slot/sub-slot pair should be kept, so we
# ignore both parts.
dep_struct[i] = x.without_slot
-def evaluate_slot_abi_equal_deps(settings, use, trees):
+def evaluate_slot_operator_equal_deps(settings, use, trees):
metadata = settings.configdict['pkg']
eapi = metadata['EAPI']
@@ -65,7 +65,7 @@ def _eval_deps(dep_struct, vardbs):
for i, x in enumerate(dep_struct):
if isinstance(x, list):
_eval_deps(x, vardbs)
- elif isinstance(x, Atom) and x.slot_abi_op == "=":
+ elif isinstance(x, Atom) and x.slot_operator == "=":
for vardb in vardbs:
best_version = vardb.match(x)
if best_version:
@@ -77,7 +77,7 @@ def _eval_deps(dep_struct, vardbs):
pass
else:
slot_part = "%s/%s=" % \
- (best_version.slot, best_version.slot_abi)
+ (best_version.slot, best_version.sub_slot)
x = x.with_slot(slot_part)
dep_struct[i] = x
break
diff --git a/pym/portage/eapi.py b/pym/portage/eapi.py
index 1d8da39fe..f13e79121 100644
--- a/pym/portage/eapi.py
+++ b/pym/portage/eapi.py
@@ -14,7 +14,7 @@ def eapi_has_iuse_effective(eapi):
def eapi_has_slot_deps(eapi):
return eapi != "0"
-def eapi_has_slot_abi(eapi):
+def eapi_has_slot_operator(eapi):
return eapi in ("4-slot-abi",)
def eapi_has_src_uri_arrows(eapi):
@@ -80,7 +80,7 @@ def eapi_allows_dots_in_use_flags(eapi):
_eapi_attrs = collections.namedtuple('_eapi_attrs',
'dots_in_PN dots_in_use_flags exports_EBUILD_PHASE_FUNC '
'iuse_defaults iuse_effective '
- 'repo_deps required_use required_use_at_most_one_of slot_abi slot_deps '
+ 'repo_deps required_use required_use_at_most_one_of slot_operator slot_deps '
'src_uri_arrows strong_blocks use_deps use_dep_defaults')
_eapi_attrs_cache = {}
@@ -111,7 +111,7 @@ def _get_eapi_attrs(eapi):
required_use = (eapi is None or eapi_has_required_use(eapi)),
required_use_at_most_one_of = (eapi is None or eapi_has_required_use_at_most_one_of(eapi)),
slot_deps = (eapi is None or eapi_has_slot_deps(eapi)),
- slot_abi = (eapi is None or eapi_has_slot_abi(eapi)),
+ slot_operator = (eapi is None or eapi_has_slot_operator(eapi)),
src_uri_arrows = (eapi is None or eapi_has_src_uri_arrows(eapi)),
strong_blocks = (eapi is None or eapi_has_strong_blocks(eapi)),
use_deps = (eapi is None or eapi_has_use_deps(eapi)),
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 5856f69ce..4c0c45d65 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -26,7 +26,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
'portage.package.ebuild.digestgen:digestgen',
'portage.package.ebuild.fetch:fetch',
'portage.package.ebuild._ipc.QueryCommand:QueryCommand',
- 'portage.dep._slot_abi:evaluate_slot_abi_equal_deps',
+ 'portage.dep._slot_abi:evaluate_slot_operator_equal_deps',
'portage.package.ebuild._spawn_nofetch:spawn_nofetch',
'portage.util._desktop_entry:validate_desktop_entry',
'portage.util.ExtractKernelVersion:ExtractKernelVersion'
@@ -1691,7 +1691,7 @@ def _post_src_install_write_metadata(settings):
continue
if k.endswith('DEPEND'):
- if eapi_attrs.slot_abi:
+ if eapi_attrs.slot_operator:
continue
token_class = Atom
else:
@@ -1711,8 +1711,8 @@ def _post_src_install_write_metadata(settings):
errors='strict') as f:
f.write(_unicode_decode(v + '\n'))
- if eapi_attrs.slot_abi:
- deps = evaluate_slot_abi_equal_deps(settings, use, QueryCommand.get_db())
+ if eapi_attrs.slot_operator:
+ deps = evaluate_slot_operator_equal_deps(settings, use, QueryCommand.get_db())
for k, v in deps.items():
filename = os.path.join(build_info_dir, k)
if not v:
diff --git a/pym/portage/tests/dep/testAtom.py b/pym/portage/tests/dep/testAtom.py
index f5a7d3749..0c72fd0e6 100644
--- a/pym/portage/tests/dep/testAtom.py
+++ b/pym/portage/tests/dep/testAtom.py
@@ -150,14 +150,14 @@ class TestAtom(TestCase):
def testSlotAbiAtom(self):
tests = (
- ("virtual/ffmpeg:0/53", "4-slot-abi", {"slot": "0", "slot_abi": "53", "slot_abi_op": None}),
- ("virtual/ffmpeg:0/53=", "4-slot-abi", {"slot": "0", "slot_abi": "53", "slot_abi_op": "="}),
- ("virtual/ffmpeg:=", "4-slot-abi", {"slot": None, "slot_abi": None, "slot_abi_op": "="}),
- ("virtual/ffmpeg:0=", "4-slot-abi", {"slot": "0", "slot_abi": None, "slot_abi_op": "="}),
- ("virtual/ffmpeg:*", "4-slot-abi", {"slot": None, "slot_abi": None, "slot_abi_op": "*"}),
- ("virtual/ffmpeg:0*", "4-slot-abi", {"slot": "0", "slot_abi": None, "slot_abi_op": "*"}),
- ("virtual/ffmpeg:0", "4-slot-abi", {"slot": "0", "slot_abi": None, "slot_abi_op": None}),
- ("virtual/ffmpeg", "4-slot-abi", {"slot": None, "slot_abi": None, "slot_abi_op": None}),
+ ("virtual/ffmpeg:0/53", "4-slot-abi", {"slot": "0", "sub_slot": "53", "slot_operator": None}),
+ ("virtual/ffmpeg:0/53=", "4-slot-abi", {"slot": "0", "sub_slot": "53", "slot_operator": "="}),
+ ("virtual/ffmpeg:=", "4-slot-abi", {"slot": None, "sub_slot": None, "slot_operator": "="}),
+ ("virtual/ffmpeg:0=", "4-slot-abi", {"slot": "0", "sub_slot": None, "slot_operator": "="}),
+ ("virtual/ffmpeg:*", "4-slot-abi", {"slot": None, "sub_slot": None, "slot_operator": "*"}),
+ ("virtual/ffmpeg:0*", "4-slot-abi", {"slot": "0", "sub_slot": None, "slot_operator": "*"}),
+ ("virtual/ffmpeg:0", "4-slot-abi", {"slot": "0", "sub_slot": None, "slot_operator": None}),
+ ("virtual/ffmpeg", "4-slot-abi", {"slot": None, "sub_slot": None, "slot_operator": None}),
)
for atom, eapi, parts in tests:
diff --git a/pym/portage/tests/dep/test_match_from_list.py b/pym/portage/tests/dep/test_match_from_list.py
index d5d718f74..2a1945b08 100644
--- a/pym/portage/tests/dep/test_match_from_list.py
+++ b/pym/portage/tests/dep/test_match_from_list.py
@@ -17,14 +17,14 @@ class Package(object):
atom = Atom(atom, allow_repo=True)
self.cp = atom.cp
slot = atom.slot
- if atom.slot_abi:
- slot = "%s/%s" % (slot, atom.slot_abi)
+ if atom.sub_slot:
+ slot = "%s/%s" % (slot, atom.sub_slot)
if not slot:
slot = '0'
self.cpv = _pkg_str(atom.cpv, slot=slot, repo=atom.repo)
self.cpv_split = catpkgsplit(self.cpv)
self.slot = self.cpv.slot
- self.slot_abi = self.cpv.slot_abi
+ self.sub_slot = self.cpv.sub_slot
self.repo = atom.repo
if atom.use:
self.use = self._use_class(atom.use.enabled)
diff --git a/pym/portage/tests/resolver/test_complete_graph.py b/pym/portage/tests/resolver/test_complete_graph.py
index 1b0342c67..95b1f8809 100644
--- a/pym/portage/tests/resolver/test_complete_graph.py
+++ b/pym/portage/tests/resolver/test_complete_graph.py
@@ -93,7 +93,7 @@ class CompleteGraphTestCase(TestCase):
test_cases = (
ResolverPlaygroundTestCase(
[">=sys-libs/x-2"],
- options = {"--complete-graph-if-new-ver" : "n", "--rebuild-if-new-slot-abi": "n"},
+ options = {"--complete-graph-if-new-ver" : "n", "--rebuild-if-new-slot": "n"},
mergelist = ["sys-libs/x-2"],
success = True,
),
@@ -106,7 +106,7 @@ class CompleteGraphTestCase(TestCase):
),
ResolverPlaygroundTestCase(
["<sys-libs/x-1"],
- options = {"--complete-graph-if-new-ver" : "n", "--rebuild-if-new-slot-abi": "n"},
+ options = {"--complete-graph-if-new-ver" : "n", "--rebuild-if-new-slot": "n"},
mergelist = ["sys-libs/x-0.1"],
success = True,
),
diff --git a/pym/portage/tests/resolver/test_slot_abi.py b/pym/portage/tests/resolver/test_slot_abi.py
index 6381bcc4d..8aed5d3d5 100644
--- a/pym/portage/tests/resolver/test_slot_abi.py
+++ b/pym/portage/tests/resolver/test_slot_abi.py
@@ -65,7 +65,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["dev-libs/icu"],
- options = {"--oneshot": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--oneshot": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["dev-libs/icu-49"]),
@@ -83,7 +83,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["dev-libs/icu"],
- options = {"--oneshot": True, "--usepkgonly": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--oneshot": True, "--usepkgonly": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["[binary]dev-libs/icu-49"]),
@@ -95,7 +95,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--update": True, "--deep": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["dev-libs/icu-49"]),
@@ -113,7 +113,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True, "--usepkgonly": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--update": True, "--deep": True, "--usepkgonly": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["[binary]dev-libs/icu-49"]),
@@ -178,7 +178,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["sys-libs/db"],
- options = {"--oneshot": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--oneshot": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["sys-libs/db-4.8"]),
@@ -196,7 +196,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["sys-libs/db"],
- options = {"--oneshot": True, "--rebuild-if-new-slot-abi": "n"},
+ options = {"--oneshot": True, "--rebuild-if-new-slot": "n"},
success = True,
mergelist = ["sys-libs/db-4.8"]),
@@ -214,7 +214,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True, "--usepkg": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--update": True, "--deep": True, "--usepkg": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["[binary]sys-libs/db-4.8"]),
@@ -226,13 +226,13 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True, "--usepkgonly": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--update": True, "--deep": True, "--usepkgonly": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["[binary]sys-libs/db-4.8"]),
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True, "--rebuild-if-new-slot-abi": "n"},
+ options = {"--update": True, "--deep": True, "--rebuild-if-new-slot": "n"},
success = True,
mergelist = []),
@@ -312,7 +312,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["dev-libs/glib"],
- options = {"--oneshot": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--oneshot": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["dev-libs/glib-2.32.3"]),
@@ -330,7 +330,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["dev-libs/glib"],
- options = {"--oneshot": True, "--usepkgonly": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--oneshot": True, "--usepkgonly": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["[binary]dev-libs/glib-2.32.3"]),
@@ -342,7 +342,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--update": True, "--deep": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["dev-libs/glib-2.32.3"]),
@@ -360,7 +360,7 @@ class SlotAbiTestCase(TestCase):
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True, "--usepkgonly": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--update": True, "--deep": True, "--usepkgonly": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["[binary]dev-libs/glib-2.32.3"]),
diff --git a/pym/portage/tests/resolver/test_slot_abi_downgrade.py b/pym/portage/tests/resolver/test_slot_abi_downgrade.py
index 45a7555c2..08e9a9db2 100644
--- a/pym/portage/tests/resolver/test_slot_abi_downgrade.py
+++ b/pym/portage/tests/resolver/test_slot_abi_downgrade.py
@@ -61,7 +61,7 @@ class SlotAbiDowngradeTestCase(TestCase):
ResolverPlaygroundTestCase(
["dev-libs/icu"],
- options = {"--oneshot": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--oneshot": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["dev-libs/icu-4.8"]),
@@ -85,7 +85,7 @@ class SlotAbiDowngradeTestCase(TestCase):
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--update": True, "--deep": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["dev-libs/icu-4.8"]),
@@ -173,7 +173,7 @@ class SlotAbiDowngradeTestCase(TestCase):
ResolverPlaygroundTestCase(
["dev-libs/glib"],
- options = {"--oneshot": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--oneshot": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["dev-libs/glib-2.30.2"]),
@@ -197,7 +197,7 @@ class SlotAbiDowngradeTestCase(TestCase):
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True, "--ignore-built-slot-abi-deps": "y"},
+ options = {"--update": True, "--deep": True, "--ignore-built-slot-operator-deps": "y"},
success = True,
mergelist = ["dev-libs/glib-2.30.2"]),
diff --git a/pym/portage/versions.py b/pym/portage/versions.py
index 692256b24..242623fde 100644
--- a/pym/portage/versions.py
+++ b/pym/portage/versions.py
@@ -372,19 +372,19 @@ class _pkg_str(_unicode):
if slot_match is None:
# Avoid an InvalidAtom exception when creating SLOT atoms
self.__dict__['slot'] = '0'
- self.__dict__['slot_abi'] = '0'
+ self.__dict__['sub_slot'] = '0'
self.__dict__['slot_invalid'] = slot
else:
- if eapi_attrs.slot_abi:
+ if eapi_attrs.slot_operator:
slot_split = slot.split("/")
self.__dict__['slot'] = slot_split[0]
if len(slot_split) > 1:
- self.__dict__['slot_abi'] = slot_split[1]
+ self.__dict__['sub_slot'] = slot_split[1]
else:
- self.__dict__['slot_abi'] = slot_split[0]
+ self.__dict__['sub_slot'] = slot_split[0]
else:
self.__dict__['slot'] = slot
- self.__dict__['slot_abi'] = slot
+ self.__dict__['sub_slot'] = slot
if repo is not None:
repo = _gen_valid_repo(repo)