Gentoo Archives: gentoo-commits

From: Arfrever Frehtes Taifersar Arahesis <arfrever@××××××.org>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Tue, 01 Dec 2015 00:27:52
Message-Id: 1448929624.4f25fa69e4a57785163345b1f4cace62daad5fea.arfrever@gentoo
1 commit: 4f25fa69e4a57785163345b1f4cace62daad5fea
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Tue Dec 1 00:27:04 2015 +0000
4 Commit: Arfrever Frehtes Taifersar Arahesis <arfrever <AT> apache <DOT> org>
5 CommitDate: Tue Dec 1 00:27:04 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4f25fa69
7
8 ebuild: Move imports to the top.
9
10 bin/ebuild | 17 +++++++----------
11 1 file changed, 7 insertions(+), 10 deletions(-)
12
13 diff --git a/bin/ebuild b/bin/ebuild
14 index ed1231f..1f99177 100755
15 --- a/bin/ebuild
16 +++ b/bin/ebuild
17 @@ -8,6 +8,8 @@ import argparse
18 import platform
19 import signal
20 import sys
21 +import textwrap
22 +
23 # This block ensures that ^C interrupts are handled quietly.
24 try:
25
26 @@ -49,7 +51,9 @@ from portage import _shell_quote
27 from portage import _unicode_decode
28 from portage import _unicode_encode
29 from portage.const import VDB_PATH
30 -from portage.exception import PortageKeyError
31 +from portage.exception import PermissionDenied, PortageKeyError, \
32 + PortagePackageException, UnsupportedAPIException
33 +import portage.util
34 from _emerge.Package import Package
35 from _emerge.RootConfig import RootConfig
36
37 @@ -96,8 +100,6 @@ if not opts.ignore_default_opts:
38 debug = opts.debug
39 force = opts.force
40
41 -import portage.util, portage.const
42 -
43 # do this _after_ 'import portage' to prevent unnecessary tracing
44 if debug and "python-trace" in portage.features:
45 import portage.debug
46 @@ -305,8 +307,7 @@ def stale_env_warning():
47 msg = ("Existing ${T}/environment for '%s' will be sourced. " + \
48 "Run 'clean' to start with a fresh environment.") % \
49 (tmpsettings["PF"], )
50 - from textwrap import wrap
51 - msg = wrap(msg, 70)
52 + msg = textwrap.wrap(msg, 70)
53 for x in msg:
54 portage.writemsg(">>> %s\n" % x)
55
56 @@ -314,9 +315,6 @@ def stale_env_warning():
57 open(os.path.join(tmpsettings['PORTAGE_BUILDDIR'],
58 '.ebuild_changed'), 'w').close()
59
60 -from portage.exception import PermissionDenied, \
61 - PortagePackageException, UnsupportedAPIException
62 -
63 if 'digest' in tmpsettings.features:
64 if pargs and pargs[0] not in ("digest", "manifest"):
65 pargs = ['digest'] + pargs
66 @@ -345,8 +343,7 @@ for arg in pargs:
67 # aux_get error
68 a = 1
69 except UnsupportedAPIException as e:
70 - from textwrap import wrap
71 - msg = wrap(str(e), 70)
72 + msg = textwrap.wrap(str(e), 70)
73 del e
74 for x in msg:
75 portage.writemsg("!!! %s\n" % x, noiselevel=-1)