From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3D26A138A1F for ; Wed, 29 Jan 2014 04:10:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA338E0AD5; Wed, 29 Jan 2014 04:10:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 76079E0AD5 for ; Wed, 29 Jan 2014 04:10:08 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8888333ECCD for ; Wed, 29 Jan 2014 04:10:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 44FC118191 for ; Wed, 29 Jan 2014 04:10:06 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1390968330.eff4e326f6feaad6bd1b807bc24eac771419e4ac.dol-sen@gentoo> Subject: [gentoo-commits] proj/portage:plugin-sync commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: eff4e326f6feaad6bd1b807bc24eac771419e4ac X-VCS-Branch: plugin-sync Date: Wed, 29 Jan 2014 04:10:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ac653b43-0aaa-4cf3-b100-3c4f62edcaa0 X-Archives-Hash: 3d8d33ffa5fd72cf09fa9f1ef64bba95 commit: eff4e326f6feaad6bd1b807bc24eac771419e4ac Author: Brian Dolbec gentoo org> AuthorDate: Wed Jan 29 04:05:30 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Wed Jan 29 04:05:30 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=eff4e326 Move the SyncManager initialization out of the loop Make the returncode not bail out of syncing the remaining repos. --- pym/_emerge/actions.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 6306f4d..6f4de04 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -1875,13 +1875,13 @@ def action_sync(emerge_config, trees=DeprecationWarning, else: selected_repos.extend(emerge_config.target_config.settings.repositories) + sync_manager = SyncManager(emerge_config.target_config.settings, emergelog) + retvals = [] for repo in selected_repos: if repo.sync_type is not None: - sync_manager = SyncManager(emerge_config.target_config.settings, - emergelog) returncode = sync_manager.sync(emerge_config, repo) if returncode != os.EX_OK: - return returncode + retvals.append(returncode) # Reload the whole config from scratch. portage._sync_mode = False @@ -1916,6 +1916,8 @@ def action_sync(emerge_config, trees=DeprecationWarning, print() display_news_notification(emerge_config.target_config, emerge_config.opts) + if retvals: + return retvals[0] return os.EX_OK