diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-08-23 02:02:06 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-08-23 02:02:06 +0000 |
commit | 0e7a83b0946dc21d461a7c542267e2963354341e (patch) | |
tree | 6baebda06aacf81ab8483ec2d9f98d83bade8d30 /pym/portage/__init__.py | |
parent | c47730c0f2b6c9270382357d20f4a47322ad5da5 (diff) | |
download | portage-0e7a83b0946dc21d461a7c542267e2963354341e.tar.gz portage-0e7a83b0946dc21d461a7c542267e2963354341e.tar.bz2 portage-0e7a83b0946dc21d461a7c542267e2963354341e.zip |
Add a new src_prepare phase function which is called in-between src_unpack
and src_configure (and bump EAPI to 2_pre3). Thanks to Ciaran McCreesh for
the suggestion.
svn path=/main/trunk/; revision=11454
Diffstat (limited to 'pym/portage/__init__.py')
-rw-r--r-- | pym/portage/__init__.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index bcf710842..a97f1eec7 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4324,7 +4324,12 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0, if retval: return retval - if mydo == "configure" and mysettings["EAPI"] in ("0", "1", "2_pre1"): + eapi = mysettings["EAPI"] + + if mydo == "configure" and eapi in ("0", "1", "2_pre1"): + return os.EX_OK + + if mydo == "prepare" and eapi in ("0", "1", "2_pre1", "2_pre2"): return os.EX_OK kwargs = actionmap[mydo]["args"] @@ -4569,7 +4574,7 @@ def _spawn_misc_sh(mysettings, commands, **kwargs): def eapi_is_supported(eapi): eapi = str(eapi).strip() - if eapi in ("2_pre2", "2_pre1"): + if eapi in ("2_pre3", "2_pre2", "2_pre1"): return True try: @@ -5105,7 +5110,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, actionmap_deps={ "setup": [], "unpack": ["setup"], - "configure": ["unpack"], + "prepare": ["unpack"], + "configure": ["prepare"], "compile":["configure"], "test": ["compile"], "install":["test"], @@ -5127,7 +5133,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, validcommands = ["help","clean","prerm","postrm","cleanrm","preinst","postinst", "config", "info", "setup", "depend", "fetch", "fetchall", "digest", - "unpack", "configure", "compile", "test", + "unpack", "prepare", "configure", "compile", "test", "install", "rpm", "qmerge", "merge", "package","unmerge", "manifest"] @@ -5713,6 +5719,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, actionmap = { "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}}, "configure":{"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, "compile": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, "test": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, |