diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-02-25 22:31:50 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-02-25 22:31:50 +0000 |
commit | 5ad95bfa14e8eeab408ec35773f48e938608b784 (patch) | |
tree | 32019d19d7b21ce4ca98b05bfe03a20367f5fc5c | |
parent | 32d5fd3a9134c6f3b4de79fa96e52377d87aca45 (diff) | |
download | portage-5ad95bfa14e8eeab408ec35773f48e938608b784.tar.gz portage-5ad95bfa14e8eeab408ec35773f48e938608b784.tar.bz2 portage-5ad95bfa14e8eeab408ec35773f48e938608b784.zip |
Move getvirtuals to _deprecated module.
svn path=/main/trunk/; revision=15469
-rw-r--r-- | pym/portage/__init__.py | 13 | ||||
-rw-r--r-- | 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 |