From 1a1fb368804f54053ac4c8cf4f016e29270d3e04 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 21 Sep 2009 13:06:29 +0000 Subject: [PATCH] Add deprecation warnings to vartree.exists_specific_cat(), getnode(), and hasnode(). Use dbapi methods instead. svn path=/main/trunk/; revision=14318 --- pym/portage/dbapi/vartree.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) -- 2.26.2