commit: 19b17fa0ecd633e2e0d759bc03a74c88c261b44b
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 3 18:00:09 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Sep 3 18:00:09 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=19b17fa0
Scheduler: clean up PORTAGE_TMPDIR warning message
The current textwrap logic produces bad output when expanding the user's
PORTAGE_TMPDIR variable. It's customary to not wrap literal values like
this, especially when it's a user setting, so drop the use of textwrap.
Before:
* The directory specified in your PORTAGE_TMPDIR variable, '/var/tmp/som
* e/really/long/path/that/looks/bad/when/you/break/it/up/but/do/it/anywa
* ys', does not exist. Please create this directory or correct your
* PORTAGE_TMPDIR setting.
After:
* The directory specified in your PORTAGE_TMPDIR variable does not exist:
*
/var/tmp/some/really/long/path/that/looks/bad/when/you/break/it/up/but/do/it/anyways
* Please create this directory or correct your PORTAGE_TMPDIR setting.
pym/_emerge/Scheduler.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index 13abc92..8eeef06 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -963,11 +963,11 @@ class Scheduler(PollScheduler):
# for ensuring sane $PWD (bug #239560) and storing elog
messages.
tmpdir = root_config.settings.get("PORTAGE_TMPDIR", "")
if not tmpdir or not os.path.isdir(tmpdir):
- msg = "The directory specified in your " + \
- "PORTAGE_TMPDIR variable, '%s', " %
tmpdir + \
- "does not exist. Please create this " + \
- "directory or correct your PORTAGE_TMPDIR
setting."
- msg = textwrap.wrap(msg, 70)
+ msg = (
+ 'The directory specified in your
PORTAGE_TMPDIR variable does not exist:',
+ tmpdir,
+ 'Please create this directory or
correct your PORTAGE_TMPDIR setting.',
+ )
out = portage.output.EOutput()
for l in msg:
out.eerror(l)