From 339ee9db95cffb5f2aa62fcfcc6be0cac461eda2 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Mon, 12 May 2008 19:14:28 +0000 Subject: [PATCH] manually merge differences with the trunk svn path=/main/branches/prefix/; revision=10304 --- bin/dispatch-conf | 18 +++++++++--------- bin/repoman | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/dispatch-conf b/bin/dispatch-conf index c08cd56c6..3069dd837 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -79,7 +79,7 @@ class dispatch: if os.path.isfile(self.options["log-file"]): shutil.copy(self.options["log-file"], self.options["log-file"] + '.old') if os.path.isfile(self.options["log-file"]) \ - or not os.path.exists(self.options["log-file"]): + or not os.path.exists(self.options["log-file"]): open(self.options["log-file"], 'w').close() # Truncate it os.chmod(self.options["log-file"], 0600) else: @@ -103,12 +103,13 @@ class dispatch: confs += self.massage(os.popen(FIND_EXTANT_CONFIGS % (path, find_opts, basename)).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 # config file freezing support @@ -303,8 +304,7 @@ class dispatch: the diff of what changed into the configured log file.""" os.system((DIFF_CONTENTS % (curconf, newconf)) + '>>' + self.options["log-file"]) try: - shutil.copyfile(newconf, curconf) - os.remove(newconf) + os.rename(newconf, curconf) except (IOError, os.error), why: print >> sys.stderr, 'dispatch-conf: Error renaming %s to %s: %s; fatal' % \ (newconf, curconf, str(why)) diff --git a/bin/repoman b/bin/repoman index 2954a15da..c64b25c25 100755 --- a/bin/repoman +++ b/bin/repoman @@ -948,7 +948,7 @@ for x in scanlist: else: raise oe if S_ISDIR(mystat.st_mode): -# !!! VCS "portability" alert! Need some function isVcsDir() or alike !!! + # !!! VCS "portability" alert! Need some function isVcsDir() or alike !!! if y == "CVS" or y == ".svn": continue for z in os.listdir(checkdir+"/files/"+y): -- 2.26.2