From: Zac Medico Date: Sat, 6 Jul 2013 22:06:28 +0000 (-0700) Subject: doebuild: deprecate returnpid X-Git-Tag: v2.2.0_alpha187~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=30c655321dbb75b97348aa1f28f9049237592079;p=portage.git doebuild: deprecate returnpid This case is not supported, since it bypasses the EbuildPhase class which implements important functionality (including post phase hooks and IPC for things like best/has_version and die). --- diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 8444e1949..23ca2385f 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -583,6 +583,15 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0, writemsg("\n", noiselevel=-1) return 1 + if returnpid and mydo != 'depend': + # This case is not supported, since it bypasses the EbuildPhase class + # which implements important functionality (including post phase hooks + # and IPC for things like best/has_version and die). + warnings.warn("portage.doebuild() called " + "with returnpid parameter enabled. This usage will " + "not be supported in the future.", + DeprecationWarning, stacklevel=2) + if mydo == "fetchall": fetchall = 1 mydo = "fetch" @@ -1507,6 +1516,12 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0, logfile=None, fd_pipes=None, returnpid=False): + if returnpid: + warnings.warn("portage.spawnebuild() called " + "with returnpid parameter enabled. This usage will " + "not be supported in the future.", + DeprecationWarning, stacklevel=2) + if not returnpid and \ (alwaysdep or "noauto" not in mysettings.features): # process dependency first