remove obsolete class
authorMarius Mauch <genone@gentoo.org>
Sun, 4 May 2008 12:55:24 +0000 (12:55 -0000)
committerMarius Mauch <genone@gentoo.org>
Sun, 4 May 2008 12:55:24 +0000 (12:55 -0000)
svn path=/main/trunk/; revision=10179

pym/portage/dbapi/vartree.py

index 039d92a3e97c2b2fa5aba27a5a3c209f2b1271db..ecc70448c8a0191b3b550580a6953371469f76e2 100644 (file)
@@ -222,48 +222,6 @@ class LinkageMap(object):
                                                        rValue.add(x)
                return rValue
                                        
-class LibraryPackageMap(object):
-       """ This class provides a library->consumer mapping generated from VDB data """
-       def __init__(self, filename, vardbapi):
-               self._filename = filename
-               self._dbapi = vardbapi
-
-       def get(self):
-               """ Read the global library->consumer map for the given vdb instance.
-                   @returns mapping of library objects (just basenames) to consumers (absolute paths)
-                       @rtype filename->list-of-paths
-               """
-               if not os.path.exists(self._filename):
-                       self.update()
-               rValue = {}
-               for l in open(self._filename, "r").read().split("\n"):
-                       mysplit = l.split()
-                       if len(mysplit) > 1:
-                               rValue[mysplit[0]] = mysplit[1].split(",")
-               return rValue
-
-       def update(self):
-               """ Update the global library->consumer map for the given vdb instance. """
-               obj_dict = {}
-               aux_get = self._dbapi.aux_get
-               for cpv in self._dbapi.cpv_all():
-                       needed_list = aux_get(cpv, ["NEEDED"])[0].splitlines()
-                       for l in needed_list:
-                               mysplit = l.split()
-                               if len(mysplit) < 2:
-                                       continue
-                               libs = mysplit[1].split(",")
-                               for lib in libs:
-                                       if not obj_dict.has_key(lib):
-                                               obj_dict[lib] = [mysplit[0]]
-                                       else:
-                                               obj_dict[lib].append(mysplit[0])
-               mapfile = open(self._filename, "w")
-               for lib in sorted(obj_dict):
-                       obj_dict[lib].sort()
-                       mapfile.write(lib+" "+",".join(obj_dict[lib])+"\n")
-               mapfile.close()
-
 class vardbapi(dbapi):
        def __init__(self, root, categories=None, settings=None, vartree=None):
                """