summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-06 01:00:47 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-06 01:00:47 -0700
commitb412cd22d395db6b488fa97dcf2ccf9bc9359b58 (patch)
tree42a0618eb0c105b532fc817982276adc0f57bf4f
parent0df0b4336bb224d249edd63ee73bbaf6e5ca9843 (diff)
downloadportage-b412cd22d395db6b488fa97dcf2ccf9bc9359b58.tar.gz
portage-b412cd22d395db6b488fa97dcf2ccf9bc9359b58.tar.bz2
portage-b412cd22d395db6b488fa97dcf2ccf9bc9359b58.zip
Show a DeprecationWarning inside doebuild() if the old 'depend' phase
code gets triggered.
-rw-r--r--pym/portage/package/ebuild/doebuild.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 37c178779..696b65eb7 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -16,6 +16,7 @@ import sys
import tempfile
from textwrap import wrap
import time
+import warnings
import zlib
import portage
@@ -340,8 +341,9 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
@type fetchonly: Boolean
@param cleanup: Passed to prepare_build_dirs (TODO: what does it do?)
@type cleanup: Boolean
- @param dbkey: A dict (usually keys and values from the depend phase, such as KEYWORDS, USE, etc..)
- @type dbkey: Dict or String
+ @param dbkey: A file path where metadata generated by the 'depend' phase
+ will be written.
+ @type dbkey: String
@param use_cache: Enables the cache
@type use_cache: Boolean
@param fetchall: Used to wrap fetch(), fetches all URIs (even ones invalid due to USE conditionals)
@@ -542,6 +544,10 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
return _spawn_phase(mydo, mysettings,
fd_pipes=fd_pipes, returnpid=returnpid)
elif isinstance(dbkey, dict):
+ warnings.warn("portage.doebuild() called " + \
+ "with dict dbkey argument. This usage will " + \
+ "not be supported in the future.",
+ DeprecationWarning, stacklevel=2)
mysettings["dbkey"] = ""
pr, pw = os.pipe()
fd_pipes = {