summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-28 15:20:35 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-28 15:20:35 -0700
commit967bc855b7e4db529afbe8b7bf7f8ed7ea55858a (patch)
tree62a994683bad713c78f47ac8ea7e1918ba113d4b
parent46c50903c00123a4e30b9032fe9ffc345c811570 (diff)
downloadportage-967bc855b7e4db529afbe8b7bf7f8ed7ea55858a.tar.gz
portage-967bc855b7e4db529afbe8b7bf7f8ed7ea55858a.tar.bz2
portage-967bc855b7e4db529afbe8b7bf7f8ed7ea55858a.zip
ResolverPlayground: remove unused root attribute
-rw-r--r--pym/portage/tests/emerge/test_simple.py1
-rw-r--r--pym/portage/tests/resolver/ResolverPlayground.py7
2 files changed, 3 insertions, 5 deletions
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 4110b5577..7ed679d62 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -138,7 +138,6 @@ pkg_info() {
eprefix = settings["EPREFIX"]
eroot = settings["EROOT"]
trees = playground.trees
- root = playground.root
portdb = trees[eroot]["porttree"].dbapi
portdir = settings["PORTDIR"]
var_cache_edb = os.path.join(eprefix, "var", "cache", "edb")
diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index 57cdebece..1a752be8d 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -17,7 +17,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.util import ensure_dirs, normalize_path
from portage.versions import catsplit
import _emerge
@@ -65,9 +65,8 @@ class ResolverPlayground(object):
profile: settings defined by the profile.
"""
self.debug = debug
- self.root = "/"
- self.eprefix = tempfile.mkdtemp()
- self.eroot = self.root + self.eprefix.lstrip(os.sep) + os.sep
+ self.eprefix = normalize_path(tempfile.mkdtemp())
+ self.eroot = self.eprefix + os.sep
self.distdir = os.path.join(self.eroot, "var", "portage", "distfiles")
self.portdir = os.path.join(self.eroot, "usr/portage")
self.vdbdir = os.path.join(self.eroot, "var/db/pkg")