public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] SyncRepos._sync: call postsync.d hooks earlier (bug 558322)
@ 2015-08-21  0:02 Zac Medico
  2015-08-21  1:31 ` Brian Dolbec
  0 siblings, 1 reply; 2+ messages in thread
From: Zac Medico @ 2015-08-21  0:02 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

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
---
 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
-- 
2.4.6



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] SyncRepos._sync: call postsync.d hooks earlier (bug 558322)
  2015-08-21  0:02 [gentoo-portage-dev] [PATCH] SyncRepos._sync: call postsync.d hooks earlier (bug 558322) Zac Medico
@ 2015-08-21  1:31 ` Brian Dolbec
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2015-08-21  1:31 UTC (permalink / raw
  To: gentoo-portage-dev

On Thu, 20 Aug 2015 17:02:34 -0700
Zac Medico <zmedico@gentoo.org> wrote:

> 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
> ---
>  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

looks good :)

-- 
Brian Dolbec <dolsen>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-21  1:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-21  0:02 [gentoo-portage-dev] [PATCH] SyncRepos._sync: call postsync.d hooks earlier (bug 558322) Zac Medico
2015-08-21  1:31 ` Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox