use ROOT iso EROOT with PreservedLibsRegistry, since all entries already have EPREFIX
authorFabian Groffen <grobian@gentoo.org>
Wed, 29 Sep 2010 11:35:31 +0000 (13:35 +0200)
committerFabian Groffen <grobian@gentoo.org>
Wed, 29 Sep 2010 11:35:31 +0000 (13:35 +0200)
pym/portage/dbapi/vartree.py
pym/portage/util/_dyn_libs/PreservedLibsRegistry.py

index fa309b0075a25b83f8adfe7180605be6e792c8bf..b13506791a242e73db7a55621f65a455d95d73c7 100644 (file)
@@ -146,7 +146,7 @@ class vardbapi(dbapi):
                self._plib_registry = None
                if _ENABLE_PRESERVE_LIBS:
                        try:
-                               self._plib_registry = PreservedLibsRegistry(self._eroot,
+                               self._plib_registry = PreservedLibsRegistry(self.root,
                                        os.path.join(self._eroot, PRIVATE_PATH,
                                        "preserved_libs_registry"))
                        except PermissionDenied:
index f05028fa9e866927dad5ec682d2dc37bda534ad3..0d0b57d21cdedb8caf867c368e38161b18f3dbc2 100644 (file)
@@ -21,16 +21,16 @@ from portage.versions import cpv_getkey
 
 class PreservedLibsRegistry(object):
        """ This class handles the tracking of preserved library objects """
-       def __init__(self, eroot, filename, autocommit=True):
+       def __init__(self, root, filename, autocommit=True):
                """ 
-                       @param eroot: root used to check existence of paths in pruneNonExisting
-                   @type eroot: String
+                       @param root: root used to check existence of paths in pruneNonExisting
+                   @type root: String
                        @param filename: absolute path for saving the preserved libs records
                    @type filename: String
                        @param autocommit: determines if the file is written after every update
                        @type autocommit: Boolean
                """
-               self._eroot = eroot
+               self._root = root
                self._filename = filename
                self._autocommit = autocommit
                self.load()
@@ -114,7 +114,7 @@ class PreservedLibsRegistry(object):
                for cps in list(self._data):
                        cpv, counter, paths = self._data[cps]
                        paths = [f for f in paths \
-                               if os.path.exists(os.path.join(self._eroot, f.lstrip(os.sep)))]
+                               if os.path.exists(os.path.join(self._root, f.lstrip(os.sep)))]
                        if len(paths) > 0:
                                self._data[cps] = (cpv, counter, paths)
                        else: