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 CD1E81387FF for ; Tue, 21 Oct 2014 05:05:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA37FE0882; Tue, 21 Oct 2014 05:05:15 +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 6F060E087A for ; Tue, 21 Oct 2014 05:05:14 +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 E5FF9340461 for ; Tue, 21 Oct 2014 05:05:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EBF788621 for ; Tue, 21 Oct 2014 05:05:08 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1413867848.200edbc13957a27bb6b520b062c0cb64d29f1041.zmedico@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: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 200edbc13957a27bb6b520b062c0cb64d29f1041 X-VCS-Branch: plugin-sync Date: Tue, 21 Oct 2014 05:05:08 +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: d252ce50-d0ff-48c5-a1ba-dd6fa3b7e30c X-Archives-Hash: 39173a0296f01fb72642c8621e062312 commit: 200edbc13957a27bb6b520b062c0cb64d29f1041 Author: Zac Medico gentoo org> AuthorDate: Tue Oct 21 02:09:01 2014 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Oct 21 05:04:08 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=200edbc1 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, '')