1 |
Author: zmedico |
2 |
Date: 2008-11-26 19:13:23 +0000 (Wed, 26 Nov 2008) |
3 |
New Revision: 12104 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Make Scheduler.merge() bail out early if PORTAGE_TMPDIR is not properly set. |
9 |
(trunk r12103) |
10 |
|
11 |
|
12 |
Modified: main/branches/2.1.6/pym/_emerge/__init__.py |
13 |
=================================================================== |
14 |
--- main/branches/2.1.6/pym/_emerge/__init__.py 2008-11-26 19:12:04 UTC (rev 12103) |
15 |
+++ main/branches/2.1.6/pym/_emerge/__init__.py 2008-11-26 19:13:23 UTC (rev 12104) |
16 |
@@ -9681,6 +9681,22 @@ |
17 |
|
18 |
for root in self.trees: |
19 |
root_config = self.trees[root]["root_config"] |
20 |
+ |
21 |
+ # Even for --pretend --fetch mode, PORTAGE_TMPDIR is required |
22 |
+ # since it might spawn pkg_nofetch which requires PORTAGE_BUILDDIR |
23 |
+ # for ensuring sane $PWD (bug #239560) and storing elog messages. |
24 |
+ tmpdir = root_config.settings.get("PORTAGE_TMPDIR", "") |
25 |
+ if not tmpdir or not os.path.isdir(tmpdir): |
26 |
+ msg = "The directory specified in your " + \ |
27 |
+ "PORTAGE_TMPDIR variable, '%s', " % tmpdir + \ |
28 |
+ "does not exist. Please create this " + \ |
29 |
+ "directory or correct your PORTAGE_TMPDIR setting." |
30 |
+ msg = textwrap.wrap(msg, 70) |
31 |
+ out = portage.output.EOutput() |
32 |
+ for l in msg: |
33 |
+ out.eerror(l) |
34 |
+ return 1 |
35 |
+ |
36 |
if self._background: |
37 |
root_config.settings.unlock() |
38 |
root_config.settings["PORTAGE_BACKGROUND"] = "1" |