summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/tests/resolver/ResolverPlayground.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index dd0141404..f41126bb7 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -7,7 +7,7 @@ import sys
import tempfile
import portage
from portage import os
-from portage.const import PORTAGE_BASE_PATH
+from portage.const import GLOBAL_CONFIG_PATH, PORTAGE_BASE_PATH
from portage.dbapi.vartree import vartree
from portage.dbapi.porttree import portagetree
from portage.dbapi.bintree import binarytree
@@ -16,6 +16,7 @@ from portage.package.ebuild.config import config
from portage.package.ebuild.digestgen import digestgen
from portage._sets import load_default_config
from portage._sets.base import InternalPackageSet
+from portage.util import ensure_dirs
from portage.versions import catsplit
import _emerge
@@ -206,6 +207,7 @@ class ResolverPlayground(object):
f.close()
write_key("EAPI", eapi)
+ write_key("COUNTER", "0")
write_key("LICENSE", lic)
write_key("PROPERTIES", properties)
write_key("SLOT", slot)
@@ -286,6 +288,11 @@ class ResolverPlayground(object):
f.write("x86\n")
f.close()
+ parent_file = os.path.join(sub_profile_dir, "parent")
+ f = open(parent_file, "w")
+ f.write("..\n")
+ f.close()
+
if profile:
for config_file, lines in profile.items():
if config_file not in self.config_files:
@@ -331,6 +338,13 @@ class ResolverPlayground(object):
f.write("%s\n" % line)
f.close()
+ #Create /usr/share/portage/config/make.globals
+ make_globals_path = os.path.join(self.eroot,
+ GLOBAL_CONFIG_PATH.lstrip(os.sep), "make.globals")
+ ensure_dirs(os.path.dirname(make_globals_path))
+ os.symlink(os.path.join(PORTAGE_BASE_PATH, "cnf", "make.globals"),
+ make_globals_path)
+
#Create /usr/share/portage/config/sets/portage.conf
default_sets_conf_dir = os.path.join(self.eroot, "usr/share/portage/config/sets")