Diffstat (limited to 'lib')
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index dd29b607c..8e0d79e29 100644
@@ -2788,8 +2788,10 @@ class depgraph(object):
# Traverse nested sets and add them to the stack
# if they're not already in the graph. Also, graph
- # edges between parent and nested sets.
- for token in arg.pset.getNonAtoms():
+ # edges between parent and nested sets. Traverse in
+ # sorted order for consistent results, using reverse
+ # sort since we pop these sets from a stack.
+ for token in sorted(arg.pset.getNonAtoms(), reverse=True):
if not token.startswith(SETPREFIX):
s = token[len(SETPREFIX):]