diff options
-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 # |