commit:     b3a945a9dad98a6d2064a9120206ad3cc9d46675
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 15 00:53:00 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Feb 15 00:56:45 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b3a945a9

_expand_set_args: un-reverse nested set traversal

Un-reverse traversal order for @profile @selected @system.

Bug: https://bugs.gentoo.org/649622
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/_emerge/depgraph.py                       | 6 ++----
 lib/portage/tests/resolver/test_or_choices.py | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 27696ad40..a8ccd270d 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -2788,10 +2788,8 @@ 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. 
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):
+                               # edges between parent and nested sets.
+                               for token in sorted(arg.pset.getNonAtoms()):
                                        if not token.startswith(SETPREFIX):
                                                continue
                                        s = token[len(SETPREFIX):]

diff --git a/lib/portage/tests/resolver/test_or_choices.py 
b/lib/portage/tests/resolver/test_or_choices.py
index 5c6803784..f9d9687f3 100644
--- a/lib/portage/tests/resolver/test_or_choices.py
+++ b/lib/portage/tests/resolver/test_or_choices.py
@@ -676,7 +676,7 @@ class OrChoicesTestCase(TestCase):
                                options = {'--update': True, '--deep': True},
                                success = True,
                                mergelist=['virtual/w3m-0'],
-                               graph_order=['@world', '@system', '@selected', 
'@profile', '[nomerge]app-misc/neofetch-6.1.0', 
'[nomerge]mail-client/neomutt-20191207', '[nomerge]www-client/lynx-2.9.0_pre4', 
'[nomerge]x11-base/xorg-server-1.20.7', '[nomerge]app-text/xmlto-0.0.28-r1', 
'[nomerge]www-client/w3m-0.5.3_p20190105', 'virtual/w3m-0'],
+                               graph_order=['@world', '@profile', '@selected', 
'@system', '[nomerge]app-misc/neofetch-6.1.0', 
'[nomerge]mail-client/neomutt-20191207', '[nomerge]www-client/lynx-2.9.0_pre4', 
'[nomerge]x11-base/xorg-server-1.20.7', '[nomerge]app-text/xmlto-0.0.28-r1', 
'[nomerge]www-client/w3m-0.5.3_p20190105', 'virtual/w3m-0'],
                        ),
 
                )
@@ -715,7 +715,7 @@ class OrChoicesTestCase(TestCase):
                                options={'--depclean': True},
                                success=True,
                                cleanlist=[],
-                               graph_order=['@world', '@system', '@selected', 
'@profile', '@____depclean_protected_set____', 
'[nomerge]app-misc/neofetch-6.1.0', '[nomerge]mail-client/neomutt-20191207', 
'[nomerge]www-client/lynx-2.9.0_pre4', '[nomerge]x11-base/xorg-server-1.20.7', 
'[nomerge]app-text/xmlto-0.0.28-r1', '[nomerge]www-client/w3m-0.5.3_p20190105', 
'[nomerge]virtual/w3m-0'],
+                               graph_order=['@world', 
'@____depclean_protected_set____', '@profile', '@selected', '@system', 
'[nomerge]app-misc/neofetch-6.1.0', '[nomerge]mail-client/neomutt-20191207', 
'[nomerge]www-client/lynx-2.9.0_pre4', '[nomerge]x11-base/xorg-server-1.20.7', 
'[nomerge]app-text/xmlto-0.0.28-r1', '[nomerge]www-client/w3m-0.5.3_p20190105', 
'[nomerge]virtual/w3m-0'],
                        ),
 
                )

Reply via email to