diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-09-27 15:34:07 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-09-27 15:34:07 +0000 |
commit | 73eb89c4515fc1bdc6f1b86bcad82aad0d03904d (patch) | |
tree | 458257ab5dc2bbeabf358d0ebef060917e01c86a | |
parent | b3231072469568bd4028b53526cd5d3a88b487e1 (diff) | |
download | portage-73eb89c4515fc1bdc6f1b86bcad82aad0d03904d.tar.gz portage-73eb89c4515fc1bdc6f1b86bcad82aad0d03904d.tar.bz2 portage-73eb89c4515fc1bdc6f1b86bcad82aad0d03904d.zip |
Do the stale env check/warning after the digest/manifest
phase when necessary.
svn path=/main/trunk/; revision=7846
-rwxr-xr-x | bin/ebuild | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/bin/ebuild b/bin/ebuild index 00c63a0ce..0384a0974 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -141,23 +141,31 @@ if "test" in pargs and "test" not in tmpsettings.features: build_dir_phases = set(["setup", "unpack", "compile", "test", "install", "package", "rpm"]) -if "clean" not in pargs and \ - "noauto" not in tmpsettings.features and \ - tmpsettings.get("PORTAGE_QUIET") != "1" and \ - build_dir_phases.intersection(pargs): - portage.doebuild_environment(ebuild, "setup", portage.root, - tmpsettings, debug, 1, portage.portdb) - env_filename = os.path.join(tmpsettings["T"], "environment") - if os.path.exists(env_filename): - msg = ("Existing ${T}/environment for '%s' will be sourced. " + \ - "Run 'clean' to start with a fresh environment.") % \ - (tmpsettings["PF"], ) - from textwrap import wrap - msg = wrap(msg, 70) - for x in msg: - portage.writemsg(">>> %s\n" % x) +def stale_env_warning(): + if "clean" not in pargs and \ + "noauto" not in tmpsettings.features and \ + tmpsettings.get("PORTAGE_QUIET") != "1" and \ + build_dir_phases.intersection(pargs): + portage.doebuild_environment(ebuild, "setup", portage.root, + tmpsettings, debug, 1, portage.portdb) + env_filename = os.path.join(tmpsettings["T"], "environment") + if os.path.exists(env_filename): + msg = ("Existing ${T}/environment for '%s' will be sourced. " + \ + "Run 'clean' to start with a fresh environment.") % \ + (tmpsettings["PF"], ) + from textwrap import wrap + msg = wrap(msg, 70) + for x in msg: + portage.writemsg(">>> %s\n" % x) + +checked_for_stale_env = False for arg in pargs: + if not checked_for_stale_env and arg not in ("digest","manifest"): + # This has to go after manifest generation since otherwise + # aux_get() might fail due to invalid ebuild digests. + stale_env_warning() + checked_for_stale_env = True try: if arg == "digest" and force: discard_digests(ebuild, tmpsettings, portage.portdb) |