summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-01-10 19:26:30 +0000
committerZac Medico <zmedico@gentoo.org>2009-01-10 19:26:30 +0000
commitc819d27ca8230a0d952236b16a08c67236f23b99 (patch)
tree880cb5142b325dd105c3644104207c7df70dadff
parent1e5aa2c56e9fc9b6c83627e963d52458a5cbb1c4 (diff)
downloadportage-c819d27ca8230a0d952236b16a08c67236f23b99.tar.gz
portage-c819d27ca8230a0d952236b16a08c67236f23b99.tar.bz2
portage-c819d27ca8230a0d952236b16a08c67236f23b99.zip
Inside action_sync(), check for the git binary when necessary and bail out
with a helpful message if it doesn't exist. Thanks to Caleb Cushing <xenoterracide@gmail.com> for the initial patch. svn path=/main/trunk/; revision=12417
-rw-r--r--pym/_emerge/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 5059ee77b..5185298c5 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -11948,6 +11948,13 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
# going to trust the user and assume that the user is in the branch
# that he/she wants updated. We'll let the user manage branches with
# git directly.
+ if portage.process.find_binary("git") is None:
+ msg = ["Command not found: git",
+ "Type \"emerge dev-util/git\" to enable git support."]
+ for l in msg:
+ writemsg_level("!!! %s\n" % l,
+ level=logging.ERROR, noiselevel=-1)
+ return 1
msg = ">>> Starting git pull in %s..." % myportdir
emergelog(xterm_titles, msg )
writemsg_level(msg + "\n")