[Server-devel] [PATCH] xs-refresh-xobuilds: If contents if missing, rm the build
Martin Langhoff
martin at laptop.org
Mon Aug 11 02:12:56 EDT 2008
We are not 100% atomic when we install a new build. If the
contents file is missing, something is amiss. rm-fr and start
again...
---
xs-refresh-xobuilds.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/xs-refresh-xobuilds.py b/xs-refresh-xobuilds.py
index c99dc15..5d2b802 100755
--- a/xs-refresh-xobuilds.py
+++ b/xs-refresh-xobuilds.py
@@ -83,7 +83,9 @@ def main():
for buildname in buildsbyname.keys():
bpath = os.path.join(BUILDSDIR,buildname)
ppath = os.path.join(PACKEDDIR,buildsbyname[buildname])
- if options.force or not os.path.exists(bpath):
+ if (options.force
+ or not os.path.exists(bpath)
+ or not os.path.exists(os.path.join(bpath,'contents'))):
installcmd = [ 'sudo', '-u', 'xs-rsync',
os.path.join(os.path.dirname(sys.argv[0]), 'xs-publish-xobuild.py') ]
if options.force:
--
1.5.5.1
More information about the Server-devel
mailing list