use EROOT with CACHE_PATH
authorFabian Groffen <grobian@gentoo.org>
Sat, 4 Sep 2010 17:57:53 +0000 (19:57 +0200)
committerFabian Groffen <grobian@gentoo.org>
Sat, 4 Sep 2010 17:57:53 +0000 (19:57 +0200)
pym/_emerge/BlockerCache.py
pym/_emerge/actions.py
pym/portage/_legacy_globals.py
pym/portage/dbapi/bintree.py
pym/portage/glsa.py

index 9c5ff4245338dfcf882d25e29fb6151aa00aa408..5c4f43e520dc5b148cfc315874906a9687129837 100644 (file)
@@ -37,8 +37,9 @@ class BlockerCache(portage.cache.mappings.MutableMapping):
                        self.atoms = atoms
 
        def __init__(self, myroot, vardb):
+               """ myroot is ignored in favour of EROOT """
                self._vardb = vardb
-               self._cache_filename = os.path.join(myroot,
+               self._cache_filename = os.path.join(vardb.settings['EROOT'],
                        portage.CACHE_PATH, "vdb_blockers.pickle")
                self._cache_version = "1"
                self._cache_data = None
index 03ca784d62f11f896c2bcc7388346c673d482167..5dc0cd5987faaacc6c640ff5d51dda240d5fc453 100644 (file)
@@ -2790,7 +2790,7 @@ def load_emerge_config(trees=None):
                        settings = trees[myroot]["vartree"].settings
                        break
 
-       mtimedbfile = os.path.join(os.path.sep, settings['ROOT'], portage.CACHE_PATH, "mtimedb")
+       mtimedbfile = os.path.join(os.path.sep, settings['EROOT'], portage.CACHE_PATH, "mtimedb")
        mtimedb = portage.MtimeDB(mtimedbfile)
        portage.output._init(config_root=settings['PORTAGE_CONFIGROOT'])
        QueryCommand._db = trees
index baabcc2e6f3691e66dee8c062d663c8875430fb3..615591af34a474f49b1fbbdb4da0a95d1d820e92 100644 (file)
@@ -16,7 +16,7 @@ def _get_legacy_global(name):
                return getattr(portage, name)
 
        elif name in ('mtimedb', 'mtimedbfile'):
-               portage.mtimedbfile = os.path.join(portage.root,
+               portage.mtimedbfile = os.path.join(portage.settings['EROOT'],
                        CACHE_PATH, "mtimedb")
                constructed.add('mtimedbfile')
                portage.mtimedb = portage.MtimeDB(portage.mtimedbfile)
index 8cb59255de6d4f65ecf3ed84a612b21e2bd76879..dca683ee223671dbfe465387506a928d941d0397 100644 (file)
@@ -731,7 +731,7 @@ class binarytree(object):
                        except ImportError:
                                from urlparse import urlparse
                        urldata = urlparse(base_url)
-                       pkgindex_file = os.path.join(self.settings["ROOT"], CACHE_PATH, "binhost",
+                       pkgindex_file = os.path.join(self.settings["EROOT"], CACHE_PATH, "binhost",
                                urldata[1] + urldata[2], "Packages")
                        pkgindex = self._new_pkgindex()
                        try:
index 9b599528f225f351e2914311296ede5eb97a14e4..b88a076626fb30208713de2d80ad63dbcac1920a 100644 (file)
@@ -36,7 +36,7 @@ def get_applied_glsas(settings):
        @rtype:         list
        @return:        list of glsa IDs
        """
-       return grabfile(os.path.join(os.sep, settings["ROOT"], CACHE_PATH, "glsa"))
+       return grabfile(os.path.join(os.sep, settings["EROOT"], CACHE_PATH, "glsa"))
 
 
 # TODO: use the textwrap module instead
@@ -666,7 +666,7 @@ class Glsa:
                """
                if not self.isApplied():
                        checkfile = codecs.open(
-                               _unicode_encode(os.path.join(os.sep, self.config["ROOT"],
+                               _unicode_encode(os.path.join(os.sep, self.config["EROOT"],
                                CACHE_PATH, "glsa"),
                                encoding=_encodings['fs'], errors='strict'), 
                                mode='a+', encoding=_encodings['content'], errors='strict')