aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-02-09 21:04:20 -0800
committerZac Medico <zmedico@gentoo.org>2020-02-09 21:05:23 -0800
commitab472882b13ebe7a8a649c723928250dc8aeb740 (patch)
tree89535587115d19726826a3a0f3b85e5cc759bc28 /lib/_emerge
parentResolverPlayground: set PORTAGE_DEBUG=1 for debug mode (diff)
downloadportage-ab472882b13ebe7a8a649c723928250dc8aeb740.tar.gz
portage-ab472882b13ebe7a8a649c723928250dc8aeb740.tar.bz2
portage-ab472882b13ebe7a8a649c723928250dc8aeb740.zip
depgraph: sort package set atoms for consistent results
Traverse the unordered set returned from PackageSet.getAtoms() in sorted order, for more consistent results. Bug: https://bugs.gentoo.org/649622 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge')
-rw-r--r--lib/_emerge/depgraph.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 1eaf20035..dd29b607c 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -4383,7 +4383,7 @@ class depgraph(object):
args = self._dynamic_config._initial_arg_list[:]
for arg in self._expand_set_args(args, add_to_digraph=True):
- for atom in arg.pset.getAtoms():
+ for atom in sorted(arg.pset.getAtoms()):
self._spinner_update()
dep = Dependency(atom=atom, onlydeps=onlydeps,
root=myroot, parent=arg)
@@ -6975,7 +6975,7 @@ class depgraph(object):
self._set_args(args)
for arg in self._expand_set_args(args, add_to_digraph=True):
- for atom in arg.pset.getAtoms():
+ for atom in sorted(arg.pset.getAtoms(), reverse=True):
self._dynamic_config._dep_stack.append(
Dependency(atom=atom, root=arg.root_config.root,
parent=arg, depth=self._UNREACHABLE_DEPTH))
@@ -9366,7 +9366,7 @@ class depgraph(object):
# added via _add_pkg() so that they are included in the
# digraph (needed at least for --tree display).
for arg in self._expand_set_args(args, add_to_digraph=True):
- for atom in arg.pset.getAtoms():
+ for atom in sorted(arg.pset.getAtoms()):
pkg, existing_node = self._select_package(
arg.root_config.root, atom)
if existing_node is None and \