summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-25 01:22:31 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-25 01:22:31 -0700
commit21e21efea3e486d994887ecfe3bb210c91bdd74e (patch)
treea38948b2b37eb9e35225f5172d5f1bbf96fad803
parentf2a369b153a0e2f45464b6e11041de79e25484ad (diff)
downloadportage-21e21efea3e486d994887ecfe3bb210c91bdd74e.tar.gz
portage-21e21efea3e486d994887ecfe3bb210c91bdd74e.tar.bz2
portage-21e21efea3e486d994887ecfe3bb210c91bdd74e.zip
Fix fragile sets config file path handling for for ResolverPlayground
and remove unecessary setconfig_fallback() usage.
-rw-r--r--pym/portage/tests/resolver/ResolverPlayground.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index 6d00270b1..952a5f265 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -6,6 +6,7 @@ import shutil
import tempfile
import portage
from portage import os
+from portage.const import PORTAGE_BASE_PATH
from portage.dbapi.vartree import vartree
from portage.dbapi.porttree import portagetree
from portage.dbapi.bintree import binarytree
@@ -18,7 +19,6 @@ from _emerge.Blocker import Blocker
from _emerge.create_depgraph_params import create_depgraph_params
from _emerge.depgraph import backtrack_depgraph
from _emerge.RootConfig import RootConfig
-from _emerge.main import setconfig_fallback
class ResolverPlayground(object):
"""
@@ -236,7 +236,8 @@ class ResolverPlayground(object):
except os.error:
pass
- provided_sets_portage_conf = os.path.realpath("../../../cnf/sets/portage.conf")
+ provided_sets_portage_conf = \
+ os.path.join(PORTAGE_BASE_PATH, "cnf/sets/portage.conf")
os.symlink(provided_sets_portage_conf, os.path.join(default_sets_conf_dir, "portage.conf"))
set_config_dir = os.path.join(user_config_dir, "sets")
@@ -297,7 +298,6 @@ class ResolverPlayground(object):
settings._init_dirs()
setconfig = load_default_config(settings, root_trees)
root_trees["root_config"] = RootConfig(settings, root_trees, setconfig)
- setconfig_fallback(root_trees["root_config"])
return settings, trees