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 40275138ACE for ; Mon, 1 Dec 2014 21:50:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C78C4E0965; Mon, 1 Dec 2014 21:50:12 +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 DCFDAE0932 for ; Mon, 1 Dec 2014 21:50:11 +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 056403405EC for ; Mon, 1 Dec 2014 21:50:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D2AABB512 for ; Mon, 1 Dec 2014 21:50:06 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1417470581.c40232d9dca194494a004a8a9044510342642fc0.mgorny@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: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c40232d9dca194494a004a8a9044510342642fc0 X-VCS-Branch: plugin-sync Date: Mon, 1 Dec 2014 21:50: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: 927e8d96-30ae-4bca-af39-12ff919d9996 X-Archives-Hash: 13e8d1f3cd19b2ed2bba3a3653fe49a7 commit: c40232d9dca194494a004a8a9044510342642fc0 Author: Zac Medico gentoo org> AuthorDate: Tue Oct 21 02:09:01 2014 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Dec 1 21:49:41 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c40232d9 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, '')