* [gentoo-commits] portage r15626 - main/branches/2.1.7/pym/portage/dbapi
@ 2010-03-02 20:46 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2010-03-02 20:46 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2010-03-02 20:46:39 +0000 (Tue, 02 Mar 2010)
New Revision: 15626
Modified:
main/branches/2.1.7/pym/portage/dbapi/porttree.py
main/branches/2.1.7/pym/portage/dbapi/vartree.py
Log:
Remove deprecated methods that call removed key_expand function. (trunk r15404)
Modified: main/branches/2.1.7/pym/portage/dbapi/porttree.py
===================================================================
--- main/branches/2.1.7/pym/portage/dbapi/porttree.py 2010-03-02 20:46:27 UTC (rev 15625)
+++ main/branches/2.1.7/pym/portage/dbapi/porttree.py 2010-03-02 20:46:39 UTC (rev 15626)
@@ -25,7 +25,7 @@
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 @@
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)
Modified: main/branches/2.1.7/pym/portage/dbapi/vartree.py
===================================================================
--- main/branches/2.1.7/pym/portage/dbapi/vartree.py 2010-03-02 20:46:27 UTC (rev 15625)
+++ main/branches/2.1.7/pym/portage/dbapi/vartree.py 2010-03-02 20:46:39 UTC (rev 15626)
@@ -32,7 +32,7 @@
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
@@ -969,7 +969,7 @@
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,
@@ -1054,50 +1054,10 @@
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:
@@ -1105,24 +1065,6 @@
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-02 20:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-02 20:46 [gentoo-commits] portage r15626 - main/branches/2.1.7/pym/portage/dbapi Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox