Move getvirtuals to _deprecated module. (trunk r15469)
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 21:05:39 +0000 (21:05 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 21:05:39 +0000 (21:05 -0000)
svn path=/main/branches/2.1.7/; revision=15678

pym/portage/__init__.py
pym/portage/_deprecated.py

index a49244e5d670c145932fec09f87bf2e778aa1282..b86e0d307963e2371b9d5213c6209a19e84f203e 100644 (file)
@@ -136,7 +136,7 @@ try:
                        'cpv_getkey@getCPFromCPV,endversion_keys,' + \
                        'suffix_value@endversion,pkgcmp,pkgsplit,vercmp,ververify',
                'portage.xpak',
-               'portage._deprecated:dep_virtual,digestParseFile,pkgmerge',
+               'portage._deprecated:dep_virtual,digestParseFile,getvirtuals,pkgmerge',
        )
 
        import portage.const
@@ -656,17 +656,6 @@ def deprecated_profile_check(settings=None):
                writemsg("\n\n", noiselevel=-1)
        return True
 
-# gets virtual package settings
-def getvirtuals(myroot):
-       """
-       Calls portage.settings.getvirtuals().
-       @deprecated: Use portage.settings.getvirtuals().
-       """
-       global settings
-       warnings.warn("portage.getvirtuals() is deprecated",
-               DeprecationWarning, stacklevel=2)
-       return settings.getvirtuals()
-
 def commit_mtimedb(mydict=None, filename=None):
        if mydict is None:
                global mtimedb
index fafda3d8b463cca1ab1a5ffbc7b1eb00e252f5d3..a9ed0622b5c93d3e25c7e58c8d20058d0742b5ee 100644 (file)
@@ -64,6 +64,15 @@ def dep_virtual(mysplit, mysettings):
                                newsplit.append(x)
        return newsplit
 
+def getvirtuals(myroot):
+       """
+       Calls portage.settings.getvirtuals().
+       @deprecated: Use portage.settings.getvirtuals().
+       """
+       warnings.warn("portage.getvirtuals() is deprecated",
+               DeprecationWarning, stacklevel=2)
+       return portage.settings.getvirtuals()
+
 def pkgmerge(mytbz2, myroot, mysettings, mydbapi=None,
        vartree=None, prev_mtimes=None, blockers=None):
        """will merge a .tbz2 file, returning a list of runtime dependencies