Show deprecation warnings if the "clone" parameters are used for the binartree, vartr...
authorZac Medico <zmedico@gentoo.org>
Wed, 30 May 2007 22:33:10 +0000 (22:33 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 30 May 2007 22:33:10 +0000 (22:33 -0000)
svn path=/main/trunk/; revision=6676

pym/portage/dbapi/bintree.py
pym/portage/dbapi/porttree.py
pym/portage/dbapi/vartree.py

index ab4b88ae91067dfca374ffe3fac6d5053bbe1c7b..7942a45dc66d6e5057509031534ad9c9ace52987 100644 (file)
@@ -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
index 86d70416f2635f625d71808ca9b87eb714db82a3..c99b0193c2cc8328a42dc31b8f437d65b823b497 100644 (file)
@@ -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
index 906c3c97f3908d1549ca875d6b6f1f5f792590d1..3c4077e70b567114058a81f880658972b7bdc7b0 100644 (file)
@@ -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