summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-06-01 17:57:19 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-06-01 17:57:19 +0000
commit39f35a8d133a62fa890ac53f9dc5a21bb768f6e9 (patch)
tree09b9a2cda18e9dcc7f1b088ef4186dbdcc03e49a
parenta4418c3da0441fb3ea5ae467e5112b0e8f66d317 (diff)
downloadbcfg2-39f35a8d133a62fa890ac53f9dc5a21bb768f6e9.tar.gz
bcfg2-39f35a8d133a62fa890ac53f9dc5a21bb768f6e9.tar.bz2
bcfg2-39f35a8d133a62fa890ac53f9dc5a21bb768f6e9.zip
fix Symlink bug
2005/05/17 10:42:56-05:00 anl.gov!desai add Reinstall for clobbered entries (Logical change 1.229) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@960 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Client/Toolset.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/Client/Toolset.py b/src/lib/Client/Toolset.py
index 6d73f6fb1..6b0f7f21e 100644
--- a/src/lib/Client/Toolset.py
+++ b/src/lib/Client/Toolset.py
@@ -216,6 +216,7 @@ class Toolset(object):
print "Symlink %s cleanup failed" % (entry.get('name'))
try:
symlink(entry.get('to'), entry.get('name'))
+ return True
except OSError:
return False
@@ -378,6 +379,11 @@ class Toolset(object):
self.VerifyPackage(child, modfiles)
else:
self.VerifyEntry(child)
+ if not self.states[child]:
+ self.CondPrint('debug', "Reinstalling clobbered entry %s %s" % (child.tag,
+ child.get('name')))
+ self.InstallEntry(child)
+ self.VerifyEntry(child)
self.CondPrint('debug', "Re-checked entry %s %s: %s" %
(child.tag, child.get('name'), self.states[child]))
for svc in [svc for svc in bchildren if svc.tag == 'Service']: