From 30c655321dbb75b97348aa1f28f9049237592079 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 6 Jul 2013 15:06:28 -0700 Subject: [PATCH] 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). --- pym/portage/package/ebuild/doebuild.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 2.26.2