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'
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
#