summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-07-06 20:23:57 +0000
committerZac Medico <zmedico@gentoo.org>2009-07-06 20:23:57 +0000
commit9e387129c51a6b5b1e1423ab68cdc4ea345bb731 (patch)
treecca09448b28311b7b0d71071a2a767b01eb92704 /pym
parentdb019afbb27145942daa3d2c9f2eaccde9f228ec (diff)
downloadportage-9e387129c51a6b5b1e1423ab68cdc4ea345bb731.tar.gz
portage-9e387129c51a6b5b1e1423ab68cdc4ea345bb731.tar.bz2
portage-9e387129c51a6b5b1e1423ab68cdc4ea345bb731.zip
Bug #273622 - Add pkg_pretend support for the ebuild(1) command (emerge
support not implemented yet). Thanks to Markus Meier <maekke@gentoo.org> for this patch. svn path=/main/trunk/; revision=13799
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 461175638..1ad8b15b6 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4920,6 +4920,9 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0,
if mydo == "prepare" and eapi in ("0", "1"):
return os.EX_OK
+ if mydo == "pretend" and eapi in ("0", "1", "2"):
+ return os.EX_OK
+
kwargs = actionmap[mydo]["args"]
mysettings["EBUILD_PHASE"] = mydo
_doebuild_exit_status_unlink(
@@ -5882,7 +5885,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
clean_phases = ("clean", "cleanrm")
validcommands = ["help","clean","prerm","postrm","cleanrm","preinst","postinst",
- "config", "info", "setup", "depend",
+ "config", "info", "setup", "depend", "pretend",
"fetch", "fetchall", "digest",
"unpack", "prepare", "configure", "compile", "test",
"install", "rpm", "qmerge", "merge",
@@ -6451,6 +6454,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
# args are for the to spawn function
actionmap = {
+"pretend": {"cmd":ebuild_sh, "args":{"droppriv":0, "free":1, "sesandbox":0, "fakeroot":0}},
"setup": {"cmd":ebuild_sh, "args":{"droppriv":0, "free":1, "sesandbox":0, "fakeroot":0}},
"unpack": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":0, "sesandbox":sesandbox, "fakeroot":0}},
"prepare": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":0, "sesandbox":sesandbox, "fakeroot":0}},