diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-01-12 08:26:20 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-01-12 08:26:20 +0000 |
commit | 56c570bb01aa738175bcf316461caa95473de659 (patch) | |
tree | d1e41a28c6b8891b05d3f8da00586457aec1b7ec | |
parent | 1c971ebe2ef393fc39d4488cebd7ea957936fe61 (diff) | |
download | portage-56c570bb01aa738175bcf316461caa95473de659.tar.gz portage-56c570bb01aa738175bcf316461caa95473de659.tar.bz2 portage-56c570bb01aa738175bcf316461caa95473de659.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. (trunk r12417)
svn path=/main/branches/2.1.6/; revision=12473
-rw-r--r-- | pym/_emerge/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index ddc33d423..bb9dac73f 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -11772,6 +11772,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") |