portdbapi.xmatch: deprecate list-visible
authorZac Medico <zmedico@gentoo.org>
Fri, 23 Sep 2011 02:29:53 +0000 (19:29 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 23 Sep 2011 02:29:53 +0000 (19:29 -0700)
bin/repoman
pym/portage/dbapi/porttree.py

index 7532a997f944e366a1307fe6bfbfa2a7eeef2b1e..85c9c1785b9dcd585d059ad9e922daa4e3073775 100755 (executable)
@@ -1927,7 +1927,7 @@ for x in scanlist:
 
                                if not baddepsyntax:
                                        ismasked = not ebuild_archs or \
-                                               pkg.cpv not in portdb.xmatch("list-visible", pkg.cp)
+                                               pkg.cpv not in portdb.xmatch("match-visible", pkg.cp)
                                        if ismasked:
                                                if not have_pmasked:
                                                        have_pmasked = bool(dep_settings._getMaskAtom(
index 4f5dc78d4d1ed8f9137e66d004cc8ac9be3878f9..eb7e36a96bce1a905de18253d19b07a61d9ad526 100644 (file)
@@ -811,6 +811,11 @@ class portdbapi(dbapi):
                "caching match function; very trick stuff"
                if level == "list-visible":
                        level = "match-visible"
+                       warnings.warn("The 'list-visible' mode of "
+                               "portage.dbapi.porttree.portdbapi.xmatch "
+                               "has been renamed to match-visible",
+                               DeprecationWarning, stacklevel=2)
+
                #if no updates are being made to the tree, we can consult our xcache...
                if self.frozen:
                        try: