Rename vardbapi.linkmap to vardbapi._linkmap since I'm
authorZac Medico <zmedico@gentoo.org>
Mon, 30 Aug 2010 06:31:47 +0000 (23:31 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 30 Aug 2010 06:31:47 +0000 (23:31 -0700)
trying to minimize the diff between the master branch and upcoming
2.1.9 branch which will not have preserve-libs support but will
still have the code in private and disabled form.

pym/_emerge/actions.py
pym/_emerge/clear_caches.py
pym/_emerge/main.py
pym/portage/dbapi/vartree.py
pym/portage/sets/libs.py

index 9f184bb6be82ab56278e3787c80bd16527103aca..a2cff59574b4befdc8bc1185ac5c9c70aba97266 100644 (file)
@@ -881,7 +881,7 @@ def calc_depclean(settings, trees, ldpath_mtimes,
                # with consumers that have not been selected for removal. If so, these
                # packages and any dependencies need to be added to the graph.
                real_vardb = trees[myroot]["vartree"].dbapi
-               linkmap = real_vardb.linkmap
+               linkmap = real_vardb._linkmap
                consumer_cache = {}
                provider_cache = {}
                consumer_map = {}
index 5999f281a4a5d28ac4a1816f74d8ebda49a59120..a0e945255ef5ba5f9faa0f2a1161109fd8a41d1b 100644 (file)
@@ -10,6 +10,6 @@ def clear_caches(trees):
                d["porttree"].dbapi._aux_cache.clear()
                d["bintree"].dbapi._aux_cache.clear()
                d["bintree"].dbapi._clear_cache()
-               d["vartree"].dbapi.linkmap._clear_cache()
+               d["vartree"].dbapi._linkmap._clear_cache()
        dircache.clear()
        gc.collect()
index 7efa35692a1bbb79ecd9cd35a72c2b2b98870d79..4b77f3b1f326f20552f91692807244436d05cadf 100644 (file)
@@ -224,7 +224,7 @@ def display_preserved_libs(vardbapi, myopts):
                        print(colorize("WARN", "!!!") + " existing preserved libs:")
 
                plibdata = vardbapi._plib_registry.getPreservedLibs()
-               linkmap = vardbapi.linkmap
+               linkmap = vardbapi._linkmap
                consumer_map = {}
                owners = {}
                linkmap_broken = False
index be2eac259050374f34179da1fb79d32c30f84f5d..72685b5ada7367b227b419b47a533e1a30e4a15b 100644 (file)
@@ -146,7 +146,7 @@ class vardbapi(dbapi):
                        # apparently this user isn't allowed to access PRIVATE_PATH
                        self._plib_registry = None
 
-               self.linkmap = LinkageMap(self)
+               self._linkmap = LinkageMap(self)
                self._owners = self._owners_db(self)
 
        def getpath(self, mykey, filename=None):
@@ -2160,7 +2160,7 @@ class dblink(object):
 
        def _linkmap_rebuild(self, **kwargs):
                """
-               Rebuild the self.linkmap if it's not broken due to missing
+               Rebuild the self._linkmap if it's not broken due to missing
                scanelf binary. Also, return early if preserve-libs is disabled
                and the preserve-libs registry is empty.
                """
@@ -2169,7 +2169,7 @@ class dblink(object):
                        not self.vartree.dbapi._plib_registry.hasEntries()):
                        return
                try:
-                       self.vartree.dbapi.linkmap.rebuild(**kwargs)
+                       self.vartree.dbapi._linkmap.rebuild(**kwargs)
                except CommandNotFound as e:
                        self._linkmap_broken = True
                        self._display_merge(_("!!! Disabling preserve-libs " \
@@ -2187,7 +2187,7 @@ class dblink(object):
                        return None
 
                os = _os_merge
-               linkmap = self.vartree.dbapi.linkmap
+               linkmap = self.vartree.dbapi._linkmap
                installed_instance = self._installed_instance
                old_contents = installed_instance.getcontents()
                root = self._eroot
@@ -2369,7 +2369,7 @@ class dblink(object):
                                path_node_map[path] = node
                        return node
 
-               linkmap = self.vartree.dbapi.linkmap
+               linkmap = self.vartree.dbapi._linkmap
                for cpv, plibs in plib_dict.items():
                        for f in plibs:
                                path_cpv_map[f] = cpv
@@ -2379,7 +2379,7 @@ class dblink(object):
                                lib_graph.add(preserved_node, None)
                                preserved_paths.add(f)
                                preserved_nodes.add(preserved_node)
-                               for c in self.vartree.dbapi.linkmap.findConsumers(f):
+                               for c in self.vartree.dbapi._linkmap.findConsumers(f):
                                        consumer_node = path_to_node(c)
                                        if not consumer_node.file_exists():
                                                continue
@@ -3238,7 +3238,7 @@ class dblink(object):
                        dblnk._clear_contents_cache()
                self._clear_contents_cache()
 
-               linkmap = self.vartree.dbapi.linkmap
+               linkmap = self.vartree.dbapi._linkmap
                self._linkmap_rebuild(include_file=os.path.join(inforoot,
                        linkmap._needed_aux_key))
 
@@ -3820,7 +3820,7 @@ class dblink(object):
 
                finally:
                        self.settings.pop('REPLACING_VERSIONS', None)
-                       self.vartree.dbapi.linkmap._clear_cache()
+                       self.vartree.dbapi._linkmap._clear_cache()
                        self.unlockdb()
                        self.vartree.dbapi._bump_mtime(self.mycpv)
                return retval
@@ -3927,7 +3927,7 @@ def unmerge(cat, pkg, myroot=None, settings=None,
                        return retval
                return os.EX_OK
        finally:
-               vartree.dbapi.linkmap._clear_cache()
+               vartree.dbapi._linkmap._clear_cache()
                mylink.unlockdb()
 
 def write_contents(contents, root, f):
index 3aeec5b7e4780fb38ab46f1cd8cb4678f953f6cd..b20acebf035ec47a690107e2e59c818765718566 100644 (file)
@@ -42,7 +42,7 @@ class LibraryFileConsumerSet(LibraryConsumerSet):
        def load(self):
                consumers = set()
                for lib in self.files:
-                       consumers.update(self.dbapi.linkmap.findConsumers(lib))
+                       consumers.update(self.dbapi._linkmap.findConsumers(lib))
 
                if not consumers:
                        return
@@ -67,10 +67,10 @@ class PreservedLibraryConsumerSet(LibraryConsumerSet):
                                for lib in libs:
                                        if self.debug:
                                                print(lib)
-                                               for x in sorted(self.dbapi.linkmap.findConsumers(lib)):
+                                               for x in sorted(self.dbapi._linkmap.findConsumers(lib)):
                                                        print("    ", x)
                                                print("-"*40)
-                                       consumers.update(self.dbapi.linkmap.findConsumers(lib))
+                                       consumers.update(self.dbapi._linkmap.findConsumers(lib))
                        # Don't rebuild packages just because they contain preserved
                        # libs that happen to be consumers of other preserved libs.
                        for libs in plib_dict.values():