diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-06-22 19:41:32 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-06-22 19:41:32 +0000 |
commit | f308a597aef938c13d529f1b6d3f6a0fce2a69c5 (patch) | |
tree | 4cd21837a417057725d6c860cbbc7f41ce136e37 | |
parent | 8bb10bfd68b8efcbd76e64b4fa4a42ee0428ec4a (diff) | |
download | portage-f308a597aef938c13d529f1b6d3f6a0fce2a69c5.tar.gz portage-f308a597aef938c13d529f1b6d3f6a0fce2a69c5.tar.bz2 portage-f308a597aef938c13d529f1b6d3f6a0fce2a69c5.zip |
Use portage_exec.find_binary since "which" always returns 0 status on darwin. Thanks to exg for reporting.
svn path=/main/trunk/; revision=3610
-rwxr-xr-x | bin/dispatch-conf | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bin/dispatch-conf b/bin/dispatch-conf index cd340a4f7..f5bf9e578 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -18,6 +18,7 @@ import os, shutil, sys, string, re, commands, atexit sys.path = ["/usr/lib/portage/pym"]+sys.path import portage, dispatch_conf +from portage_exec import find_binary FIND_EXTANT_CONFIGS = "find %s/ -iname '._cfg????_*' | sed -e 's://:/:g'" DIFF_CONTENTS = 'diff -Nu %s %s' @@ -83,12 +84,13 @@ class dispatch: confs += self.massage (os.popen (FIND_EXTANT_CONFIGS % (path,)).readlines ()) - if self.options['use-rcs'] == 'yes' and ((os.system( "which rcs >/dev/null 2>&1" ) == 256) - or (os.system( "which ci >/dev/null 2>&1" ) == 256) - or (os.system( "which co >/dev/null 2>&1" ) == 256) - or (os.system( "which rcsmerge >/dev/null 2>&1" ) == 256)): - print >> sys.stderr, 'dispatch-conf: Error finding all RCS utils and use-rcs=yes in config; fatal' - return False + if self.options['use-rcs'] == 'yes': + for rcs_util in ("rcs", "ci", "co", "rcsmerge"): + if not find_binary(rcs_util): + print >> sys.stderr, \ + 'dispatch-conf: Error finding all RCS utils and " + \ + "use-rcs=yes in config; fatal' + return False # |