diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-16 21:40:25 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-16 21:40:25 -0700 |
commit | 7161609fd9606245a5100683eac526f282b0c1a7 (patch) | |
tree | b8d0db2a739e4fab24cf66201db0d892d9a0cfe1 | |
parent | c080922e0bd40ced9df7169bf13e06133e7fb790 (diff) | |
download | portage-7161609fd9606245a5100683eac526f282b0c1a7.tar.gz portage-7161609fd9606245a5100683eac526f282b0c1a7.tar.bz2 portage-7161609fd9606245a5100683eac526f282b0c1a7.zip |
Use EbuildPhase to eliminate duplicate phase conditionals from doebuild().
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 30 |
1 files changed, 2 insertions, 28 deletions
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"])) |