Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/modules/sync/
Date: Mon, 01 Dec 2014 21:50:13
Message-Id: 1417470581.690b4314ceaafb8bce748b5be9704f3d6abcee61.mgorny@gentoo
1 commit: 690b4314ceaafb8bce748b5be9704f3d6abcee61
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 5 04:37:10 2014 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 1 21:49:41 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=690b4314
7
8 emaint sync: Fix bug 522032, add a one time only post-sync hook call
9
10 After all repos have been synced, the emaint sync module runs another post-sync hook call
11 passing it the 'PORTAGE_SYNC_HOOK_FINAL' value as the url.
12 This value can be read by the post-sync hook to decide if it needs to run or pass.
13 This allows flexible, precise control over post-sync hooks for multiple repositories.
14
15 Caveat: Current app-portage/portage-utils post_sync hook script does not pass on the url
16 to the postsync.d/* scripts that it intiates.
17
18 ---
19 pym/portage/emaint/modules/sync/sync.py | 3 +++
20 1 file changed, 3 insertions(+)
21
22 diff --git a/pym/portage/emaint/modules/sync/sync.py b/pym/portage/emaint/modules/sync/sync.py
23 index b657133..9b0d82c 100644
24 --- a/pym/portage/emaint/modules/sync/sync.py
25 +++ b/pym/portage/emaint/modules/sync/sync.py
26 @@ -192,10 +192,13 @@ class SyncRepos(object):
27 msgs.extend(self._check_updates())
28 display_news_notification(self.emerge_config.target_config,
29 self.emerge_config.opts)
30 + rcode = sync_manager.perform_post_sync_hook('PORTAGE_SYNC_HOOK_FINAL')
31 if retvals:
32 msgs.extend(self.rmessage(retvals, 'sync'))
33 else:
34 msgs.append(self.rmessage(('None', os.EX_OK), 'sync'))
35 + if rcode:
36 + msgs.append(self.rmessage('None', rcode), 'post-sync')
37 if return_messages:
38 return msgs
39 return