1 |
commit: acad62063c074f5b4ff692bc52514b1b8d028100 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 29 06:18:08 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 29 06:18:08 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=acad6206 |
7 |
|
8 |
ResolverPlayground: fix to make emerge happy |
9 |
|
10 |
--- |
11 |
pym/portage/tests/resolver/ResolverPlayground.py | 16 +++++++++++++++- |
12 |
1 files changed, 15 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py |
15 |
index dd01414..f41126b 100644 |
16 |
--- a/pym/portage/tests/resolver/ResolverPlayground.py |
17 |
+++ b/pym/portage/tests/resolver/ResolverPlayground.py |
18 |
@@ -7,7 +7,7 @@ import sys |
19 |
import tempfile |
20 |
import portage |
21 |
from portage import os |
22 |
-from portage.const import PORTAGE_BASE_PATH |
23 |
+from portage.const import GLOBAL_CONFIG_PATH, PORTAGE_BASE_PATH |
24 |
from portage.dbapi.vartree import vartree |
25 |
from portage.dbapi.porttree import portagetree |
26 |
from portage.dbapi.bintree import binarytree |
27 |
@@ -16,6 +16,7 @@ from portage.package.ebuild.config import config |
28 |
from portage.package.ebuild.digestgen import digestgen |
29 |
from portage._sets import load_default_config |
30 |
from portage._sets.base import InternalPackageSet |
31 |
+from portage.util import ensure_dirs |
32 |
from portage.versions import catsplit |
33 |
|
34 |
import _emerge |
35 |
@@ -206,6 +207,7 @@ class ResolverPlayground(object): |
36 |
f.close() |
37 |
|
38 |
write_key("EAPI", eapi) |
39 |
+ write_key("COUNTER", "0") |
40 |
write_key("LICENSE", lic) |
41 |
write_key("PROPERTIES", properties) |
42 |
write_key("SLOT", slot) |
43 |
@@ -286,6 +288,11 @@ class ResolverPlayground(object): |
44 |
f.write("x86\n") |
45 |
f.close() |
46 |
|
47 |
+ parent_file = os.path.join(sub_profile_dir, "parent") |
48 |
+ f = open(parent_file, "w") |
49 |
+ f.write("..\n") |
50 |
+ f.close() |
51 |
+ |
52 |
if profile: |
53 |
for config_file, lines in profile.items(): |
54 |
if config_file not in self.config_files: |
55 |
@@ -331,6 +338,13 @@ class ResolverPlayground(object): |
56 |
f.write("%s\n" % line) |
57 |
f.close() |
58 |
|
59 |
+ #Create /usr/share/portage/config/make.globals |
60 |
+ make_globals_path = os.path.join(self.eroot, |
61 |
+ GLOBAL_CONFIG_PATH.lstrip(os.sep), "make.globals") |
62 |
+ ensure_dirs(os.path.dirname(make_globals_path)) |
63 |
+ os.symlink(os.path.join(PORTAGE_BASE_PATH, "cnf", "make.globals"), |
64 |
+ make_globals_path) |
65 |
+ |
66 |
#Create /usr/share/portage/config/sets/portage.conf |
67 |
default_sets_conf_dir = os.path.join(self.eroot, "usr/share/portage/config/sets") |