Use EROOT with VDB_PATH in recent changes.
authorZac Medico <zmedico@gentoo.org>
Sun, 8 May 2011 04:46:08 +0000 (21:46 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 8 May 2011 04:46:08 +0000 (21:46 -0700)
pym/_emerge/EbuildPhase.py
pym/portage/util/_dyn_libs/LinkageMapELF.py

index e75673c7c841d86f31796d2e8c59b3ece5708051..21d7f47200905cd1f4296a0660c385bcb824d97e 100644 (file)
@@ -146,8 +146,8 @@ class EbuildPhase(CompositeTask):
 
                if (self.phase in self._locked_phases and
                        "ebuild-locks" in self.settings.features):
-                       root = self.settings["ROOT"]
-                       lock_path = os.path.join(root, portage.VDB_PATH + "-ebuild")
+                       eroot = self.settings["EROOT"]
+                       lock_path = os.path.join(eroot, portage.VDB_PATH + "-ebuild")
                        if os.access(os.path.dirname(lock_path), os.W_OK):
                                self._ebuild_lock = lockdir(lock_path)
                self._start_task(ebuild_process, self._ebuild_exit)
index ce77bb44245a1159a091d56b66fac9562f941b37..31aacbbf27cc2e098aaa3c9d34477c79ed2dcbed 100644 (file)
@@ -183,8 +183,7 @@ class LinkageMapELF(object):
                                lines.append((include_file, line))
 
                aux_keys = [self._needed_aux_key]
-               vdb_path = os.path.join(self._root, portage.VDB_PATH)
-               vdb_lock = lockdir(vdb_path)
+               self._dbapi.lock()
                try:
                        for cpv in self._dbapi.cpv_all():
                                if exclude_pkgs is not None and cpv in exclude_pkgs:
@@ -194,7 +193,7 @@ class LinkageMapELF(object):
                                for line in self._dbapi.aux_get(cpv, aux_keys)[0].splitlines():
                                        lines.append((needed_file, line))
                finally:
-                       unlockdir(vdb_lock)
+                       self._dbapi.unlock()
 
                # have to call scanelf for preserved libs here as they aren't 
                # registered in NEEDED.ELF.2 files