From: Zac Medico Date: Tue, 17 Aug 2010 04:40:25 +0000 (-0700) Subject: Use EbuildPhase to eliminate duplicate phase conditionals from doebuild(). X-Git-Tag: v2.2_rc68~138 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7161609fd9606245a5100683eac526f282b0c1a7;p=portage.git Use EbuildPhase to eliminate duplicate phase conditionals from doebuild(). --- diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 520ab6700..621d1662d 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -577,24 +577,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, # if any of these are being called, handle them -- running them out of # the sandbox -- and stop now. - if mydo == "help": - return spawn(_shell_quote(ebuild_sh_binary) + " " + mydo, - mysettings, debug=debug, free=1, logfile=logfile) - elif mydo == "setup": - retval = spawn( - _shell_quote(ebuild_sh_binary) + " " + mydo, mysettings, - debug=debug, free=1, logfile=logfile, fd_pipes=fd_pipes, - returnpid=returnpid) - if returnpid: - return retval - if secpass >= 2: - """ Privileged phases may have left files that need to be made - writable to a less privileged user.""" - apply_recursive_permissions(mysettings["T"], - uid=portage_uid, gid=portage_gid, dirmode=0o70, dirmask=0, - filemode=0o60, filemask=0) - return retval - elif mydo in ("preinst", "postinst"): + if mydo in ("config", "help", "info", "postinst", + "preinst", "pretend", "postrm", "prerm", "setup"): if returnpid: return spawn( _shell_quote(ebuild_sh_binary) + " " + mydo, @@ -608,16 +592,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, task_scheduler.add(ebuild_phase) task_scheduler.run() return ebuild_phase.returncode - elif mydo in ("prerm", "postrm", "config", "info", "pretend"): - retval = spawn( - _shell_quote(ebuild_sh_binary) + " " + mydo, - mysettings, debug=debug, free=1, logfile=logfile, - fd_pipes=fd_pipes, returnpid=returnpid) - - if returnpid: - return retval - - return retval mycpv = "/".join((mysettings["CATEGORY"], mysettings["PF"]))