summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-03-29 22:52:17 +0200
committerSebastian Luther <SebastianLuther@gmx.de>2010-04-02 21:46:17 +0200
commitc929cd1053f795f55e31626423909979da1190a5 (patch)
treeab5f8f79825c10729bcb2e9869e5b30bdd5e2457 /pym/portage
parent910e5b29ab0a8a449ae23844240d168f20f5e67e (diff)
downloadportage-c929cd1053f795f55e31626423909979da1190a5.tar.gz
portage-c929cd1053f795f55e31626423909979da1190a5.tar.bz2
portage-c929cd1053f795f55e31626423909979da1190a5.zip
Implement emerge part of pkg_pretend
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/const.py2
-rw-r--r--pym/portage/package/ebuild/doebuild.py5
2 files changed, 3 insertions, 4 deletions
diff --git a/pym/portage/const.py b/pym/portage/const.py
index 1450fe2e8..4171b9999 100644
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@ -80,7 +80,7 @@ INCREMENTALS = ("USE", "USE_EXPAND", "USE_EXPAND_HIDDEN",
"CONFIG_PROTECT_MASK", "CONFIG_PROTECT",
"PRELINK_PATH", "PRELINK_PATH_MASK",
"PROFILE_ONLY_VARIABLES")
-EBUILD_PHASES = ("setup", "unpack", "prepare", "configure",
+EBUILD_PHASES = ("pretend", "setup", "unpack", "prepare", "configure",
"compile", "test", "install",
"package", "preinst", "postinst","prerm", "postrm",
"nofetch", "config", "info", "other")
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index e5716f0a5..b64e10d48 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -301,7 +301,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
fetchonly=0, cleanup=0, dbkey=None, use_cache=1, fetchall=0, tree=None,
mydbapi=None, vartree=None, prev_mtimes=None,
fd_pipes=None, returnpid=False):
-
"""
Wrapper function that invokes specific ebuild phases through the spawning
of ebuild.sh
@@ -523,7 +522,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
# we can temporarily override PORTAGE_TMPDIR with a random temp dir
# so that there's no need for locking and it can be used even if the
# user isn't in the portage group.
- if mydo in ("info",):
+ if mydo in ("info", "pretend"):
tmpdir = tempfile.mkdtemp()
tmpdir_orig = mysettings["PORTAGE_TMPDIR"]
mysettings["PORTAGE_TMPDIR"] = tmpdir
@@ -785,7 +784,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
writemsg(_("!!! post postinst failed; exiting.\n"),
noiselevel=-1)
return phase_retval
- elif mydo in ("prerm", "postrm", "config", "info"):
+ elif mydo in ("prerm", "postrm", "config", "info", "pretend"):
retval = spawn(
_shell_quote(ebuild_sh_binary) + " " + mydo,
mysettings, debug=debug, free=1, logfile=logfile,