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 D81041381F3 for ; Wed, 19 Jun 2013 18:02:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D0DDCE094C; Wed, 19 Jun 2013 18:02:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6F3B2E094C for ; Wed, 19 Jun 2013 18:02:40 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 83B9333DDD8 for ; Wed, 19 Jun 2013 18:02:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 0189BE468F for ; Wed, 19 Jun 2013 18:02:37 +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: <1371664941.a9e9402329500180b3e61cacf7b98b60a0685761.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/repository/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/repository/config.py X-VCS-Directories: pym/portage/repository/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: a9e9402329500180b3e61cacf7b98b60a0685761 X-VCS-Branch: master Date: Wed, 19 Jun 2013 18:02:37 +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: 02074218-91b7-42eb-a39a-8949f1b82a9c X-Archives-Hash: 8d86f6e2841c8e6cee54bd5ec1f8358d commit: a9e9402329500180b3e61cacf7b98b60a0685761 Author: Zac Medico gentoo org> AuthorDate: Wed Jun 19 18:02:21 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Jun 19 18:02:21 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a9e94023 RepoConfigLoader: handle invalid repos.conf more --- pym/portage/repository/config.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index de1e7bc..508a56e 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -515,17 +515,15 @@ class RepoConfigLoader(object): writemsg( _("!!! Error while reading repo config file: %s\n") % e, noiselevel=-1) - # The configparser state is unreliable (prone to odd quirky - # exceptions) after is has thrown an error, so just return early. - self.prepos = {'DEFAULT': RepoConfig('DEFAULT', {})} - self.prepos_order = () - self.ignored_repos = () - self.location_map = {} - self.treemap = {} - self._prepos_changed = True - self._repo_location_list = () - self.missing_repo_names = frozenset() - return + # The configparser state is unreliable (prone to quirky + # exceptions) after it has thrown an error, so use empty + # config and try to fall back to PORTDIR{,_OVERLAY}. + prepos.clear() + prepos['DEFAULT'] = RepoConfig('DEFAULT', {}) + location_map.clear() + treemap.clear() + ignored_map.clear() + ignored_location_map.clear() # If PORTDIR_OVERLAY contains a repo with the same repo_name as # PORTDIR, then PORTDIR is overridden.