From 5dd00bf58f6000404a0559a7e7dc09ef9efacbc4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 30 May 2007 22:40:55 +0000 Subject: [PATCH] Show deprecation warnings if the "clone" parameters are used for the binartree, vartree, or portagetree constructors. (trunk r6676) svn path=/main/branches/2.1.2/; revision=6677 --- pym/portage.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pym/portage.py b/pym/portage.py index ecf14c703..199dac8fc 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -4709,6 +4709,8 @@ class portagetree: def __init__(self, root="/", virtual=None, clone=None, settings=None): if clone: + writemsg("portagetree.__init__(): deprecated " + \ + "use of clone parameter\n", noiselevel=-1) self.root=clone.root self.portroot=clone.portroot self.pkglines=clone.pkglines @@ -5492,6 +5494,8 @@ class vartree(object): def __init__(self, root="/", virtual=None, clone=None, categories=None, settings=None): if clone: + writemsg("vartree.__init__(): deprecated " + \ + "use of clone parameter\n", noiselevel=-1) self.root = clone.root[:] self.dbapi = copy.deepcopy(clone.dbapi) self.populated = 1 @@ -6292,6 +6296,8 @@ class binarytree(object): "this tree scans for a list of all packages available in PKGDIR" def __init__(self, root, pkgdir, virtual=None, settings=None, clone=None): if clone: + writemsg("binarytree.__init__(): deprecated " + \ + "use of clone parameter\n", noiselevel=-1) # XXX This isn't cloning. It's an instance of the same thing. self.root=clone.root self.pkgdir=clone.pkgdir -- 2.26.2