[cig-commits] r18635 - in cs/buildbot/trunk: . bin buildbot buildbot/scripts
brad at geodynamics.org
brad at geodynamics.org
Wed Jun 15 12:05:36 PDT 2011
Author: brad
Date: 2011-06-15 12:05:36 -0700 (Wed, 15 Jun 2011)
New Revision: 18635
Added:
cs/buildbot/trunk/bin/rmtree
Modified:
cs/buildbot/trunk/buildbot/bs.py
cs/buildbot/trunk/buildbot/scripts/packager.py
cs/buildbot/trunk/setup.py
Log:
Added rmtree to replace 'rm -rf' which may be less reliable.
Added: cs/buildbot/trunk/bin/rmtree
===================================================================
--- cs/buildbot/trunk/bin/rmtree (rev 0)
+++ cs/buildbot/trunk/bin/rmtree 2011-06-15 19:05:36 UTC (rev 18635)
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+import shutil
+import sys
+import os
+
+if len(sys.argv) != 2:
+ raise ValueError("usage: rmtree DIR")
+
+path = sys.argv[1]
+
+
+if os.path.exists(path):
+ shutil.rmtree(path, ignore_errors=True)
Property changes on: cs/buildbot/trunk/bin/rmtree
___________________________________________________________________
Name: svn:executable
+ *
Modified: cs/buildbot/trunk/buildbot/bs.py
===================================================================
--- cs/buildbot/trunk/buildbot/bs.py 2011-06-15 15:48:40 UTC (rev 18634)
+++ cs/buildbot/trunk/buildbot/bs.py 2011-06-15 19:05:36 UTC (rev 18635)
@@ -329,7 +329,7 @@
s(step.ShellCommand,
description=["being paranoid"] + desc,
descriptionDone=desc + ["paranoia"],
- command=["rm", "-rf", "__rename__"],
+ command=["rmtree", "__rename__"],
workdir=".",
env=env,
haltOnFailure=True,
@@ -345,7 +345,7 @@
s(step.ShellCommand,
description=["nuking old builds"] + desc,
descriptionDone=desc + ["nuked old builds"],
- command=("rm -rf %s*" % workbase),
+ command=("rmtree %s*" % workbase),
workdir=".",
env=env,
haltOnFailure=True,
@@ -361,7 +361,7 @@
s(step.ShellCommand,
description=["nuking prefix"] + desc,
descriptionDone=desc + ["nuked prefix"],
- command=["rm", "-rf", self.pseudoPrefix],
+ command=["rmtree", self.pseudoPrefix],
workdir=workdir,
env=env,
haltOnFailure=True,
Modified: cs/buildbot/trunk/buildbot/scripts/packager.py
===================================================================
--- cs/buildbot/trunk/buildbot/scripts/packager.py 2011-06-15 15:48:40 UTC (rev 18634)
+++ cs/buildbot/trunk/buildbot/scripts/packager.py 2011-06-15 19:05:36 UTC (rev 18635)
@@ -392,7 +392,7 @@
def stageWindowsInstallation(prefix, workdir, python, pl):
stage = join(workdir, "buildbot-win-stage")
- shutil.rmtree(stage)
+ shutil.rmtree(stage, ignore_errors=True)
os.mkdir(stage)
os.chdir(stage)
@@ -626,7 +626,7 @@
def installSource(pl, package, revision, url, workdir):
src = "src/" + package
- shutil.rmtree(src)
+ shutil.rmtree(src, ignore_errors=True)
if not isdir("src"):
os.makedirs("src")
if False:
Modified: cs/buildbot/trunk/setup.py
===================================================================
--- cs/buildbot/trunk/setup.py 2011-06-15 15:48:40 UTC (rev 18634)
+++ cs/buildbot/trunk/setup.py 2011-06-15 19:05:36 UTC (rev 18635)
@@ -41,6 +41,7 @@
"bin/rm",
"bin/ln",
"bin/cp",
+ "bin/rmtree",
]
if sys.platform == "win32":
scripts.append("contrib/windows/buildbot.bat")
More information about the CIG-COMMITS
mailing list