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 5524D1389E2 for ; Thu, 4 Dec 2014 20:04:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 12BA8E08F4; Thu, 4 Dec 2014 20:04:38 +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 8D281E08E2 for ; Thu, 4 Dec 2014 20:04:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C559A3403F9 for ; Thu, 4 Dec 2014 20:04:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 91E43B944 for ; Thu, 4 Dec 2014 20:04:31 +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: <1417722995.ca7966d72cdb1522d3d29536a07c7bb8d7ecaa3f.dol-sen@gentoo> Subject: [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/modules/merges/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/emaint/modules/merges/merges.py X-VCS-Directories: pym/portage/emaint/modules/merges/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: ca7966d72cdb1522d3d29536a07c7bb8d7ecaa3f X-VCS-Branch: plugin-sync Date: Thu, 4 Dec 2014 20:04:31 +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: 215eaa0b-8f40-49cf-98c1-4e876b6f42ea X-Archives-Hash: b08d673f1dad4bf6a2e7bf51cf28b8d3 Message-ID: <20141204200431.00dSYRS1v3oGjulF1JwqYM5BdaqQKl-LJvnWu2wON9Y@z> commit: ca7966d72cdb1522d3d29536a07c7bb8d7ecaa3f Author: Zac Medico gentoo org> AuthorDate: Tue Oct 21 02:09:01 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Dec 4 19:56:35 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ca7966d7 MergesHandler: don't use load_emerge_config Use the old portage.db API since load_emerge_config isn't really needed here. In order to reload the config, use portage._reset_legacy_globals(). --- pym/portage/emaint/modules/merges/merges.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pym/portage/emaint/modules/merges/merges.py b/pym/portage/emaint/modules/merges/merges.py index 1a67cb5..7146c76 100644 --- a/pym/portage/emaint/modules/merges/merges.py +++ b/pym/portage/emaint/modules/merges/merges.py @@ -1,8 +1,6 @@ # Copyright 2005-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -from _emerge.actions import load_emerge_config - import portage from portage import os, _unicode_encode from portage.const import MERGING_IDENTIFIER, PORTAGE_BIN_PATH, PRIVATE_PATH, \ @@ -174,8 +172,7 @@ class MergesHandler(object): @type pkg_invalid_entries: set """ - emerge_config = load_emerge_config() - portdb = emerge_config.target_config.trees['porttree'].dbapi + portdb = portage.db[portage.root]['porttree'].dbapi for failed_pkg in failed_pkgs: # validate pkg name pkg_name = '%s' % failed_pkg.replace(MERGING_IDENTIFIER, '') @@ -271,8 +268,8 @@ class MergesHandler(object): for pkg in sorted(self._scan()): results.append("'%s' still found as a failed merge." % pkg) # reload config and remove successful packages from tracking file - emerge_config = load_emerge_config() - vardb = emerge_config.target_config.trees['vartree'].dbapi + portage._reset_legacy_globals() + vardb = portage.db[portage.root]['vartree'].dbapi still_failed_pkgs = {} for pkg, mtime in failed_pkgs.items(): pkg_name = '%s' % pkg.replace(MERGING_IDENTIFIER, '')