From: Zac Medico Date: Mon, 21 Sep 2009 13:06:29 +0000 (-0000) Subject: Add deprecation warnings to vartree.exists_specific_cat(), getnode(), and X-Git-Tag: v2.2_rc42~84 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1a1fb368804f54053ac4c8cf4f016e29270d3e04;p=portage.git Add deprecation warnings to vartree.exists_specific_cat(), getnode(), and hasnode(). Use dbapi methods instead. svn path=/main/trunk/; revision=14318 --- 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)