* 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
-------------
</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
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,
.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
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.
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
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
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
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))
"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")
"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
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']
# 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}
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:
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 \
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)
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
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)
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).
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()
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.
"""
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:
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:
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()
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
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
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:
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
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)
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)
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
# 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,
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
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):
# 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
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:
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
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:
"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
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
'--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,
"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
"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."),
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
__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):
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:
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 = {}
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):
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
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":
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
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
_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
_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
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
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
% (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):
@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:
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)
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)
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)
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)
_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']
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:
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
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):
_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 = {}
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)),
'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'
continue
if k.endswith('DEPEND'):
- if eapi_attrs.slot_abi:
+ if eapi_attrs.slot_operator:
continue
token_class = Atom
else:
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:
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:
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)
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,
),
),
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,
),
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"]),
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"]),
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"]),
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"]),
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"]),
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"]),
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"]),
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 = []),
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"]),
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"]),
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"]),
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"]),
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"]),
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"]),
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"]),
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"]),
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)