diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-28 04:09:50 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-28 04:09:50 +0000 |
commit | fef40645fed31ddb36ca167375490b8dfc025140 (patch) | |
tree | b6665e794e4bbbc6fc00f51e01afbffd0aa8712f | |
parent | 2a2d408bb4ebfdcc64dbd121ed2a7129e9ff5dbe (diff) | |
download | portage-fef40645fed31ddb36ca167375490b8dfc025140.tar.gz portage-fef40645fed31ddb36ca167375490b8dfc025140.tar.bz2 portage-fef40645fed31ddb36ca167375490b8dfc025140.zip |
When the fetch phase fails inside doebuild(), create an eerror log since the mod_echo module might push the original message off of the top of the terminal and prevent the user from being able to see it.
svn path=/main/trunk/; revision=7419
-rw-r--r-- | pym/portage/__init__.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 6e5ca9d42..a87fa0919 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3819,10 +3819,12 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, return 1 # Build directory creation isn't required for any of these. + have_build_dirs = False if mydo not in ("digest", "fetch", "help", "manifest"): mystatus = prepare_build_dirs(myroot, mysettings, cleanup) if mystatus: return mystatus + have_build_dirs = True # PORTAGE_LOG_FILE is set above by the prepare_build_dirs() call. logfile = mysettings.get("PORTAGE_LOG_FILE", None) if mydo == "unmerge": @@ -3937,6 +3939,18 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, mydo not in ("digest", "manifest") and "noauto" not in features) if need_distfiles and not fetch( fetchme, mysettings, listonly=listonly, fetchonly=fetchonly): + if have_build_dirs: + # Create an elog message for this fetch failure since the + # mod_echo module might push the original message off of the + # top of the terminal and prevent the user from being able to + # see it. + mysettings["EBUILD_PHASE"] = "unpack" + cmd = "source '%s/isolated-functions.sh' ; " % PORTAGE_BIN_PATH + cmd += "eerror \"Fetch failed for '%s'\"" % mycpv + portage.process.spawn(["bash", "-c", cmd], + env=mysettings.environ()) + from portage.elog import elog_process + elog_process(mysettings.mycpv, mysettings) return 1 if mydo == "fetch" and listonly: |