ResolverPlayground: remove unused root attribute
authorZac Medico <zmedico@gentoo.org>
Fri, 28 Oct 2011 22:20:35 +0000 (15:20 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 28 Oct 2011 22:20:35 +0000 (15:20 -0700)
pym/portage/tests/emerge/test_simple.py
pym/portage/tests/resolver/ResolverPlayground.py

index 4110b5577e01912750db71a2a1bd61b82813aadd..7ed679d62943123a042f7dfbb900c2764a73e2d6 100644 (file)
@@ -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")
index 57cdebece4f78dfdcc8c9043b9efb8b7982f5e17..1a752be8dd30d9264cae7dbc51ebbae1218b2006 100644 (file)
@@ -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")