commit:     bafb62bb32432094f1c413a9a7e2dc902ff11a5a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 21 00:02:26 2015 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Aug 21 02:10:59 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=bafb62bb

SyncRepos._sync: call postsync.d hooks earlier (bug 558322)

Execute the hooks immediately after all repos have synced.

X-Gentoo-Bug: 558322
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=558322
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/emaint/modules/sync/sync.py | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/pym/portage/emaint/modules/sync/sync.py 
b/pym/portage/emaint/modules/sync/sync.py
index 601118f..57c779d 100644
--- a/pym/portage/emaint/modules/sync/sync.py
+++ b/pym/portage/emaint/modules/sync/sync.py
@@ -233,13 +233,6 @@ class SyncRepos(object):
                retvals = sync_scheduler.retvals
                msgs.extend(sync_scheduler.msgs)
 
-               # Reload the whole config.
-               portage._sync_mode = False
-               self._reload_config()
-               self._do_pkg_moves()
-               msgs.extend(self._check_updates())
-               display_news_notification(self.emerge_config.target_config,
-                       self.emerge_config.opts)
                # run the post_sync_hook one last time for
                # run only at sync completion hooks
                rcode = sync_manager.perform_post_sync_hook('')
@@ -249,6 +242,15 @@ class SyncRepos(object):
                        msgs.extend(self.rmessage([('None', os.EX_OK)], 'sync'))
                if rcode:
                        msgs.extend(self.rmessage([('None', rcode)], 
'post-sync'))
+
+               # Reload the whole config.
+               portage._sync_mode = False
+               self._reload_config()
+               self._do_pkg_moves()
+               msgs.extend(self._check_updates())
+               display_news_notification(self.emerge_config.target_config,
+                       self.emerge_config.opts)
+
                if return_messages:
                        return msgs
                return

Reply via email to