From b412cd22d395db6b488fa97dcf2ccf9bc9359b58 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 6 Sep 2010 01:00:47 -0700 Subject: Show a DeprecationWarning inside doebuild() if the old 'depend' phase code gets triggered. --- pym/portage/package/ebuild/doebuild.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pym') 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 = { -- cgit v1.2.3-1-g7c22