summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py12
-rw-r--r--pym/portage/const.py2
2 files changed, 11 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 4656a5de..15766f9a 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4042,8 +4042,16 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
"ebuild's files must be downloaded"
print "!!! manually. See the comments in" + \
" the ebuild for more information.\n"
- mysettings["EBUILD_PHASE"] = "unpack"
- spawn(EBUILD_SH_BINARY + " nofetch", mysettings)
+ ebuild_phase = mysettings.get("EBUILD_PHASE")
+ try:
+ mysettings["EBUILD_PHASE"] = "nofetch"
+ spawn(_shell_quote(EBUILD_SH_BINARY) + \
+ " nofetch", mysettings)
+ finally:
+ if ebuild_phase is None:
+ mysettings.pop("EBUILD_PHASE", None)
+ else:
+ mysettings["EBUILD_PHASE"] = ebuild_phase
elif listonly:
continue
elif not filedict[myfile]:
diff --git a/pym/portage/const.py b/pym/portage/const.py
index 19d858b1..2958cf3c 100644
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@ -58,7 +58,7 @@ INCREMENTALS = ["USE", "USE_EXPAND", "USE_EXPAND_HIDDEN", "FEATURES",
EBUILD_PHASES = ["setup", "unpack", "configure",
"compile", "test", "install",
"package", "preinst", "postinst","prerm", "postrm",
- "other"]
+ "nofetch", "other"]
EAPI = 1