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 A94EF138E66 for ; Mon, 24 Feb 2014 09:23:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 307ADE0B4B; Mon, 24 Feb 2014 09:23:39 +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 A2CF9E0B4B for ; Mon, 24 Feb 2014 09:23:38 +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 9FB2733EC99 for ; Mon, 24 Feb 2014 09:23:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 3D62518875 for ; Mon, 24 Feb 2014 09:23:36 +0000 (UTC) From: "Alexander Berntsen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexander Berntsen" Message-ID: <1393233587.34c0ea135617ee9bc1c3a684c109b3c0b27a31dd.bernalex@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py pym/portage/dbapi/bintree.py X-VCS-Directories: pym/portage/dbapi/ pym/_emerge/ X-VCS-Committer: bernalex X-VCS-Committer-Name: Alexander Berntsen X-VCS-Revision: 34c0ea135617ee9bc1c3a684c109b3c0b27a31dd X-VCS-Branch: master Date: Mon, 24 Feb 2014 09:23:36 +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: d55bf84e-9774-4c4c-8a34-d91bf935bfc5 X-Archives-Hash: 69af8dbd2432aebe0a9444bf66044e42 commit: 34c0ea135617ee9bc1c3a684c109b3c0b27a31dd Author: Alexander Berntsen plaimi net> AuthorDate: Mon Feb 24 09:09:13 2014 +0000 Commit: Alexander Berntsen gentoo org> CommitDate: Mon Feb 24 09:19:47 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=34c0ea13 Clean up bad PORTAGE_BINHOST handling Suggested-by: Arfrever Frehtes Taifersar Arahesis Apache.Org> Reviewed-by: Arfrever Frehtes Taifersar Arahesis Apache.Org> --- pym/_emerge/actions.py | 11 ++++++++--- pym/portage/dbapi/bintree.py | 10 ++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 95c5c14..19659fd 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -44,7 +44,7 @@ from portage.dbapi.dep_expand import dep_expand from portage.dbapi._expand_new_virt import expand_new_virt from portage.dep import Atom from portage.eclass_cache import hashed_path -from portage.exception import InvalidAtom, InvalidData +from portage.exception import InvalidAtom, InvalidData, ParseError from portage.output import blue, bold, colorize, create_color_func, darkgreen, \ red, xtermTitle, xtermTitleReset, yellow good = create_color_func("GOOD") @@ -3701,8 +3701,13 @@ def run_action(emerge_config): # Populate the bintree with current --getbinpkg setting. # This needs to happen before expand_set_arguments(), in case # any sets use the bintree. - mytrees["bintree"].populate( - getbinpkgs="--getbinpkg" in emerge_config.opts) + try: + mytrees["bintree"].populate( + getbinpkgs="--getbinpkg" in emerge_config.opts) + except ParseError as e: + writemsg("\n\n!!!%s.\nSee make.conf(5) for more info.\n" + % e, noiselevel=-1) + return 1 del mytrees, mydb diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 7b61c1f..229ce3b 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -27,7 +27,7 @@ from portage.const import CACHE_PATH from portage.dbapi.virtual import fakedbapi from portage.dep import Atom, use_reduce, paren_enclose from portage.exception import AlarmSignal, InvalidData, InvalidPackageName, \ - PermissionDenied, PortageException + ParseError, PermissionDenied, PortageException from portage.localization import _ from portage import _movefile from portage import os @@ -909,11 +909,9 @@ class binarytree(object): traceback.print_exc() raise - except ValueError as _: - writemsg("\n\n!!! Invalid PORTAGE_BINHOST value " - "'%s'.\nSee man make.conf(5) for more info." - "\n" % url.lstrip(), noiselevel=-1) - exit(1) + except ValueError: + raise ParseError("Invalid Portage BINHOST value '%s'" + % url.lstrip()) if f is None: