Remove deprecated methods that call removed key_expand function.
authorZac Medico <zmedico@gentoo.org>
Fri, 19 Feb 2010 22:09:15 +0000 (22:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 19 Feb 2010 22:09:15 +0000 (22:09 -0000)
svn path=/main/trunk/; revision=15404

pym/portage/dbapi/porttree.py
pym/portage/dbapi/vartree.py

index a4cf16fc056755729863bf579994099a14aec784..f40d94d0bca94520ee5c278491f3e0eeb63b57b7 100644 (file)
@@ -25,7 +25,7 @@ from portage.localization import _
 from portage.manifest import Manifest
 
 from portage import eclass_cache, auxdbkeys, doebuild, flatten, \
-       listdir, dep_expand, eapi_is_supported, key_expand, dep_check, \
+       listdir, dep_expand, eapi_is_supported, dep_check, \
        _eapi_is_deprecated
 from portage import os
 from portage import _encodings
@@ -1227,20 +1227,6 @@ class portagetree(object):
                psplit = pkgsplit(mysplit[1])
                return "/".join([self.portroot, mysplit[0], psplit[0], mysplit[1]])+".ebuild"
 
-       def resolve_specific(self, myspec):
-               warnings.warn(
-                       "portage.dbapi.porttree.portagetree.resolve_specific() is deprecated",
-                       DeprecationWarning)
-               cps = catpkgsplit(myspec)
-               if not cps:
-                       return None
-               mykey = key_expand(cps[0]+"/"+cps[1], mydb=self.dbapi,
-                       settings=self.settings)
-               mykey = mykey + "-" + cps[2]
-               if cps[3] != "r0":
-                       mykey = mykey + "-" + cps[3]
-               return mykey
-
        def depcheck(self, mycheck, use="yes", myusesplit=None):
                return dep_check(mycheck, self.dbapi, use=use, myuse=myusesplit)
 
index 06273520dc44fb3d6a322a0dd483c54311eb7de3..01c6de7c9fbf851587533c42c0d717c9f16d93cd 100644 (file)
@@ -32,7 +32,7 @@ from portage.exception import CommandNotFound, \
        FileNotFound, PermissionDenied, UnsupportedAPIException
 from portage.localization import _
 
-from portage import listdir, dep_expand, digraph, flatten, key_expand, \
+from portage import listdir, dep_expand, digraph, flatten, \
        doebuild_environment, doebuild, env_update, prepare_build_dirs, \
        abssymlink, movefile, _movefile, bsd_chflags, cpv_getkey
 
@@ -1698,7 +1698,7 @@ class vartree(object):
                        self.root = root[:]
                        if settings is None:
                                from portage import settings
-                       self.settings = settings # for key_expand calls
+                       self.settings = settings
                        if categories is None:
                                categories = settings.categories
                        self.dbapi = vardbapi(self.root, categories=categories,
@@ -1783,50 +1783,10 @@ class vartree(object):
                masked package for nodes in this nodes list."""
                return self.dbapi.cp_all()
 
-       def exists_specific_cat(self, cpv, use_cache=1):
-               warnings.warn(
-                       "portage.dbapi.vartree.vartree.exists_specific_cat() is deprecated",
-                       DeprecationWarning)
-               cpv = key_expand(cpv, mydb=self.dbapi, use_cache=use_cache,
-                       settings=self.settings)
-               a = catpkgsplit(cpv)
-               if not a:
-                       return 0
-               mylist = listdir(self.getpath(a[0]), EmptyOnError=1)
-               for x in mylist:
-                       b = pkgsplit(x)
-                       if not b:
-                               self.dbapi.invalidentry(self.getpath(a[0], filename=x))
-                               continue
-                       if a[1] == b[0]:
-                               return 1
-               return 0
-
        def getebuildpath(self, fullpackage):
                cat, package = catsplit(fullpackage)
                return self.getpath(fullpackage, filename=package+".ebuild")
 
-       def getnode(self, mykey, use_cache=1):
-               warnings.warn(
-                       "portage.dbapi.vartree.vartree.getnode() is deprecated",
-                       DeprecationWarning)
-               mykey = key_expand(mykey, mydb=self.dbapi, use_cache=use_cache,
-                       settings=self.settings)
-               if not mykey:
-                       return []
-               mysplit = catsplit(mykey)
-               mydirlist = listdir(self.getpath(mysplit[0]),EmptyOnError=1)
-               returnme = []
-               for x in mydirlist:
-                       mypsplit = pkgsplit(x)
-                       if not mypsplit:
-                               self.dbapi.invalidentry(self.getpath(mysplit[0], filename=x))
-                               continue
-                       if mypsplit[0] == mysplit[1]:
-                               appendme = [mysplit[0]+"/"+x, [mysplit[0], mypsplit[0], mypsplit[1], mypsplit[2]]]
-                               returnme.append(appendme)
-               return returnme
-
        def getslot(self, mycatpkg):
                "Get a slot for a catpkg; assume it exists."
                try:
@@ -1834,24 +1794,6 @@ class vartree(object):
                except KeyError:
                        return ""
 
-       def hasnode(self, mykey, use_cache):
-               """Does the particular node (cat/pkg key) exist?"""
-               warnings.warn(
-                       "portage.dbapi.vartree.vartree.hadnode() is deprecated",
-                       DeprecationWarning)
-               mykey = key_expand(mykey, mydb=self.dbapi, use_cache=use_cache,
-                       settings=self.settings)
-               mysplit = catsplit(mykey)
-               mydirlist = listdir(self.getpath(mysplit[0]), EmptyOnError=1)
-               for x in mydirlist:
-                       mypsplit = pkgsplit(x)
-                       if not mypsplit:
-                               self.dbapi.invalidentry(self.getpath(mysplit[0], filename=x))
-                               continue
-                       if mypsplit[0] == mysplit[1]:
-                               return 1
-               return 0
-
        def populate(self):
                self.populated=1