[Checkins] SVN: zc.recipe.rhrc/trunk/ Fixed: Errors were raised if stopping a run script failed during

jim cvs-admin at zope.org
Thu Dec 20 19:34:01 UTC 2012


Log message for revision 128809:
  Fixed: Errors were raised if stopping a run script failed during
         uninstall.  This could cause a buildout to be wedged, because
         you couldn't uninstall a broken/missing run script.
  

Changed:
  U   zc.recipe.rhrc/trunk/README.txt
  U   zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/README.txt
  U   zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/__init__.py

-=-
Modified: zc.recipe.rhrc/trunk/README.txt
===================================================================
--- zc.recipe.rhrc/trunk/README.txt	2012-12-20 18:55:35 UTC (rev 128808)
+++ zc.recipe.rhrc/trunk/README.txt	2012-12-20 19:34:01 UTC (rev 128809)
@@ -10,6 +10,14 @@
 Changes
 *******
 
+1.4.2 (2012-12-20)
+==================
+
+Fixed: Errors were raised if stopping a run script failed during
+       uninstall.  This could cause a buildout to be wedged, because
+       you couldn't uninstall a broken/missing run script.
+
+
 1.4.1 (2012-08-31)
 ==================
 

Modified: zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/README.txt
===================================================================
--- zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/README.txt	2012-12-20 18:55:35 UTC (rev 128808)
+++ zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/README.txt	2012-12-20 19:34:01 UTC (rev 128809)
@@ -856,7 +856,6 @@
 
 .. make sure it works with multiple parts
 
-
     >>> write('buildout.cfg',
     ... """
     ... [buildout]
@@ -886,8 +885,38 @@
     zeo stop
     zope stop
 
+.. make sure it works even if run script is missing
 
 
+    >>> write(demo, 'zeo',  '#!/bin/sh\necho zeo\n')
+    >>> os.chmod(join(demo, 'zeo'), 0755)
+
+    >>> write('buildout.cfg',
+    ... """
+    ... [buildout]
+    ... parts = zoperc
+    ...
+    ... [zoperc]
+    ... recipe = zc.recipe.rhrc
+    ... parts = zeo
+    ... dest = %(dest)s
+    ... process-management = true
+    ... [zeo]
+    ... """ % dict(dest=demo))
+
+    >>> print system('bin/buildout'),
+    Installing zoperc.
+    zeo:
+    zeo
+
+    >>> remove(demo, 'zeo')
+
+    >>> print system('bin/buildout buildout:parts=') # doctest: +ELLIPSIS
+    Uninstalling zoperc.
+    Running uninstall recipe.
+    zeo:
+    ...
+
 Regression Tests
 ================
 

Modified: zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/__init__.py
===================================================================
--- zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/__init__.py	2012-12-20 18:55:35 UTC (rev 128808)
+++ zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/__init__.py	2012-12-20 19:34:01 UTC (rev 128809)
@@ -184,8 +184,7 @@
     name = options.get('deployment-name', name)
     if options.get('process-management') == 'true':
         ctlpath = os.path.join(options.get('dest', '/etc/init.d'), name)
-        if subprocess.call([ctlpath, 'stop']):
-            raise RuntimeError("%s start failed" % ctlpath)
+        subprocess.call([ctlpath, 'stop'])
     if options.get('chkconfig'):
         chkconfigcommand = options.get('chkconfigcommand', '/sbin/chkconfig')
         os.system(chkconfigcommand+' --del '+name)



More information about the checkins mailing list