diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-21 13:06:29 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-21 13:06:29 +0000 |
commit | 1a1fb368804f54053ac4c8cf4f016e29270d3e04 (patch) | |
tree | fa647a39954b21f6a5ccb56c68ed41ed0d870611 | |
parent | fa8ea8ef3cc8a7433d496e3dc54d56a0bd2ffd06 (diff) | |
download | portage-1a1fb368804f54053ac4c8cf4f016e29270d3e04.tar.gz portage-1a1fb368804f54053ac4c8cf4f016e29270d3e04.tar.bz2 portage-1a1fb368804f54053ac4c8cf4f016e29270d3e04.zip |
Add deprecation warnings to vartree.exists_specific_cat(), getnode(), and
hasnode(). Use dbapi methods instead.
svn path=/main/trunk/; revision=14318
-rw-r--r-- | pym/portage/dbapi/vartree.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index dcec611f0..5db04e4b1 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -51,6 +51,7 @@ import codecs import re, shutil, stat, errno, copy, subprocess import logging import sys +import warnings try: import cPickle as pickle @@ -1734,6 +1735,9 @@ class vartree(object): 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) @@ -1754,6 +1758,9 @@ class vartree(object): 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: @@ -1780,6 +1787,9 @@ class vartree(object): 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) |