Gentoo Archives: gentoo-commits

From: Alexander Berntsen <bernalex@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/_emerge/
Date: Mon, 24 Feb 2014 09:23:39
Message-Id: 1393233587.34c0ea135617ee9bc1c3a684c109b3c0b27a31dd.bernalex@gentoo
1 commit: 34c0ea135617ee9bc1c3a684c109b3c0b27a31dd
2 Author: Alexander Berntsen <alexander <AT> plaimi <DOT> net>
3 AuthorDate: Mon Feb 24 09:09:13 2014 +0000
4 Commit: Alexander Berntsen <bernalex <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 24 09:19:47 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=34c0ea13
7
8 Clean up bad PORTAGE_BINHOST handling
9
10 Suggested-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
11 Reviewed-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
12
13 ---
14 pym/_emerge/actions.py | 11 ++++++++---
15 pym/portage/dbapi/bintree.py | 10 ++++------
16 2 files changed, 12 insertions(+), 9 deletions(-)
17
18 diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
19 index 95c5c14..19659fd 100644
20 --- a/pym/_emerge/actions.py
21 +++ b/pym/_emerge/actions.py
22 @@ -44,7 +44,7 @@ from portage.dbapi.dep_expand import dep_expand
23 from portage.dbapi._expand_new_virt import expand_new_virt
24 from portage.dep import Atom
25 from portage.eclass_cache import hashed_path
26 -from portage.exception import InvalidAtom, InvalidData
27 +from portage.exception import InvalidAtom, InvalidData, ParseError
28 from portage.output import blue, bold, colorize, create_color_func, darkgreen, \
29 red, xtermTitle, xtermTitleReset, yellow
30 good = create_color_func("GOOD")
31 @@ -3701,8 +3701,13 @@ def run_action(emerge_config):
32 # Populate the bintree with current --getbinpkg setting.
33 # This needs to happen before expand_set_arguments(), in case
34 # any sets use the bintree.
35 - mytrees["bintree"].populate(
36 - getbinpkgs="--getbinpkg" in emerge_config.opts)
37 + try:
38 + mytrees["bintree"].populate(
39 + getbinpkgs="--getbinpkg" in emerge_config.opts)
40 + except ParseError as e:
41 + writemsg("\n\n!!!%s.\nSee make.conf(5) for more info.\n"
42 + % e, noiselevel=-1)
43 + return 1
44
45 del mytrees, mydb
46
47
48 diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
49 index 7b61c1f..229ce3b 100644
50 --- a/pym/portage/dbapi/bintree.py
51 +++ b/pym/portage/dbapi/bintree.py
52 @@ -27,7 +27,7 @@ from portage.const import CACHE_PATH
53 from portage.dbapi.virtual import fakedbapi
54 from portage.dep import Atom, use_reduce, paren_enclose
55 from portage.exception import AlarmSignal, InvalidData, InvalidPackageName, \
56 - PermissionDenied, PortageException
57 + ParseError, PermissionDenied, PortageException
58 from portage.localization import _
59 from portage import _movefile
60 from portage import os
61 @@ -909,11 +909,9 @@ class binarytree(object):
62 traceback.print_exc()
63
64 raise
65 - except ValueError as _:
66 - writemsg("\n\n!!! Invalid PORTAGE_BINHOST value "
67 - "'%s'.\nSee man make.conf(5) for more info."
68 - "\n" % url.lstrip(), noiselevel=-1)
69 - exit(1)
70 + except ValueError:
71 + raise ParseError("Invalid Portage BINHOST value '%s'"
72 + % url.lstrip())
73
74 if f is None: