* [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/sync/, pym/_emerge/
@ 2017-02-13 8:55 Zac Medico
0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2017-02-13 8:55 UTC (permalink / raw
To: gentoo-commits
commit: f57ae38b978069e50c2b1bf2d41bffed23ecc11d
Author: Alexandru Elisei <alexandru.elisei <AT> gmail <DOT> com>
AuthorDate: Sat Feb 4 17:49:32 2017 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 08:36:20 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f57ae38b
emerge: make emerge --sync print messages from SyncRepos.auto_sync()
Emerge will only display messages if --quiet is not set.
The word 'emaint' has been removed from two messages to avoid confusion.
pym/_emerge/actions.py | 7 +++++--
pym/portage/emaint/modules/sync/sync.py | 7 +++----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index ccb6a5d5e..71e362e3c 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -68,6 +68,7 @@ from portage._global_updates import _global_updates
from portage.sync.old_tree_timestamp import old_tree_timestamp_warn
from portage.localization import _
from portage.metadata import action_metadata
+from portage.emaint.main import print_results
from _emerge.clear_caches import clear_caches
from _emerge.countdown import countdown
@@ -1999,8 +2000,10 @@ def action_sync(emerge_config, trees=DeprecationWarning,
syncer = SyncRepos(emerge_config)
-
- success, msgs = syncer.auto_sync(options={'return-messages': False})
+ return_messages = "--quiet" not in emerge_config.opts
+ success, msgs = syncer.auto_sync(options={'return-messages': return_messages})
+ if return_messages:
+ print_results(msgs)
return os.EX_OK if success else 1
diff --git a/pym/portage/emaint/modules/sync/sync.py b/pym/portage/emaint/modules/sync/sync.py
index c8d4ca1aa..08a92a7a8 100644
--- a/pym/portage/emaint/modules/sync/sync.py
+++ b/pym/portage/emaint/modules/sync/sync.py
@@ -123,9 +123,8 @@ class SyncRepos(object):
available = self._get_repos(auto_sync_only=False)
selected = self._match_repos(repos, available)
if not selected:
- msgs = [red(" * ") + "Emaint sync, The specified repos were not found: %s"
- % (bold(", ".join(repos))) + "\n ...returning"
- ]
+ msgs = [red(" * ") + "The specified repos were not found: %s" %
+ (bold(", ".join(repos))) + "\n ...returning"]
if return_messages:
return (False, msgs)
return (False, None)
@@ -208,7 +207,7 @@ class SyncRepos(object):
selected_repos = [repo for repo in selected_repos if repo.sync_type is not None]
msgs = []
if not selected_repos:
- msgs.append("Emaint sync, nothing to sync... returning")
+ msgs.append("Nothing to sync... returning")
if return_messages:
msgs.extend(self.rmessage([('None', os.EX_OK)], 'sync'))
return (True, msgs)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-13 8:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-13 8:55 [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/sync/, pym/_emerge/ Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox