[gentoo-portage-dev] [PATCH] emerge: make emerge --sync print messages from SyncRepos.auto_sync()

2017-02-04 Thread Alexandru Elisei
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 ccb6a5d..71e362e 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 076297a..ca5461d 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)
-- 
2.10.2



Re: [gentoo-portage-dev] [PATCH] sys-apps/portage: add native-extensions USE flag (bug 571444)

2017-02-04 Thread Michał Górny
W dniu 01.02.2017, śro o godzinie 20∶46 -0500, użytkownik Michael
Orlitzky napisał:
> On 02/01/2017 04:03 PM, Michał Górny wrote:
> > >  SLOT="0"
> > > -IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
> > > +IUSE="build doc epydoc +ipc linguas_ru native-extensions selinux
> > > xattr"
> > 
> > Wouldn't it be better to enable it by default?
> > 
> 
> Please don't enshrine personal preferences into IUSE defaults unless
> they're critical to the package.

You're saying nonsense. There is no reason for most of Gentoo users to
default to crippled Portage.

-- 
Best regards,
Michał Górny


signature.asc
Description: This is a digitally signed message part