From 534c8c841c927bcc1fa5a5ba63be81580c89b5c0 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 2 Mar 2010 21:05:39 +0000 Subject: [PATCH] Move getvirtuals to _deprecated module. (trunk r15469) svn path=/main/branches/2.1.7/; revision=15678 --- pym/portage/__init__.py | 13 +------------ pym/portage/_deprecated.py | 9 +++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index a49244e5d..b86e0d307 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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 diff --git a/pym/portage/_deprecated.py b/pym/portage/_deprecated.py index fafda3d8b..a9ed0622b 100644 --- a/pym/portage/_deprecated.py +++ b/pym/portage/_deprecated.py @@ -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 -- 2.26.2