commit:     75f0936b8866b143643abcd6c302cd72fc71eef3
Author:     Alexandru Elisei <alexandru.elisei <AT> gmail <DOT> com>
AuthorDate: Mon Feb 20 17:53:56 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 00:01:38 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=75f0936b

emerge: sync given repos even if auto-sync is false (bug 610328)

The auto-sync attribute is more useful for emerge --sync with zero repo
arguments. When specific repo arguments are given to emerge --sync, it
makes sense to sync those repos regardless of the auto-sync attribute.

X-Gentoo-Bug: 610328
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=610328

 pym/_emerge/actions.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 71e362e3c..cc0269d5d 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -1999,9 +1999,13 @@ def action_sync(emerge_config, trees=DeprecationWarning,
                        action=action, args=[], trees=trees, opts=opts)
 
        syncer = SyncRepos(emerge_config)
-
        return_messages = "--quiet" not in emerge_config.opts
-       success, msgs = syncer.auto_sync(options={'return-messages': 
return_messages})
+       options = {'return-messages' : return_messages}
+       if emerge_config.args:
+               options['repo'] = emerge_config.args
+               success, msgs = syncer.repo(options=options)
+       else:
+               success, msgs = syncer.auto_sync(options=options)
        if return_messages:
                print_results(msgs)
 

Reply via email to