diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-05-30 22:33:10 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-05-30 22:33:10 +0000 |
commit | cc2e6123deac772c34e8fb1794c590226a162828 (patch) | |
tree | 4d67831bb71ed347a29b1bfe2dc98fdfac488c03 | |
parent | e0e6ed26532ea0c277849df3dcb3767a67ec6a2a (diff) | |
download | portage-cc2e6123deac772c34e8fb1794c590226a162828.tar.gz portage-cc2e6123deac772c34e8fb1794c590226a162828.tar.bz2 portage-cc2e6123deac772c34e8fb1794c590226a162828.zip |
Show deprecation warnings if the "clone" parameters are used for the binartree, vartree, or portagetree constructors.
svn path=/main/trunk/; revision=6676
-rw-r--r-- | pym/portage/dbapi/bintree.py | 2 | ||||
-rw-r--r-- | pym/portage/dbapi/porttree.py | 2 | ||||
-rw-r--r-- | pym/portage/dbapi/vartree.py | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index ab4b88ae9..7942a45dc 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -95,6 +95,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("binartree.__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 diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 86d70416f..c99b0193c 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -727,6 +727,8 @@ class portagetree(object): """ 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 diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 906c3c97f..3c4077e70 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -669,6 +669,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 |