[Checkins] SVN: z3c.recipe.usercrontab/trunk/ The crontab now gets checked every time buildout runs, not only when there's

Reinout van Rees reinout at vanrees.org
Mon Aug 24 06:25:57 EDT 2009


Log message for revision 103128:
  The crontab now gets checked every time buildout runs, not only when there's
    a change in the configuration.

Changed:
  U   z3c.recipe.usercrontab/trunk/CHANGES.txt
  U   z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/README.txt
  U   z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/__init__.py

-=-
Modified: z3c.recipe.usercrontab/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.usercrontab/trunk/CHANGES.txt	2009-08-24 10:08:15 UTC (rev 103127)
+++ z3c.recipe.usercrontab/trunk/CHANGES.txt	2009-08-24 10:25:57 UTC (rev 103128)
@@ -4,7 +4,8 @@
 0.7 (unreleased)
 ----------------
 
-- Nothing changed yet.
+- The crontab now gets checked every time buildout runs, not only when there's
+  a change in the configuration.  [reinout]
 
 
 0.6.1 (2009-06-17)

Modified: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/README.txt
===================================================================
--- z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/README.txt	2009-08-24 10:08:15 UTC (rev 103127)
+++ z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/README.txt	2009-08-24 10:25:57 UTC (rev 103128)
@@ -170,11 +170,35 @@
     >>> '# @reboot\techo nothing happens' in c.crontab
     True
     >>> print c
+    # Generated by /sample-buildout [foo]
+    # @reboot   echo nothing happens
+    # END /sample-buildout [foo]
+
+Re-running buildout runs the crontab recipe even when there's no change:
+
+    >>> print 'start', system(buildout)
+    start Updating foo.
     <BLANKLINE>
+    >>> c.read_crontab()
+    >>> print c
     # Generated by /sample-buildout [foo]
     # @reboot   echo nothing happens
     # END /sample-buildout [foo]
+
+This means that a crontab is fixed up if we mucked it up by hand:
+
+    >>> c.crontab = []
+    >>> c.write_crontab()
+    >>> c.read_crontab()
+    >>> print c
+    >>> print 'start', system(buildout)
+    start Updating foo.
     <BLANKLINE>
+    >>> c.read_crontab()
+    >>> print c
+    # Generated by /sample-buildout [foo]
+    # @reboot   echo nothing happens
+    # END /sample-buildout [foo]
     
 Uninstall the recipe:
 

Modified: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/__init__.py
===================================================================
--- z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/__init__.py	2009-08-24 10:08:15 UTC (rev 103127)
+++ z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/__init__.py	2009-08-24 10:25:57 UTC (rev 103128)
@@ -32,7 +32,7 @@
         return ()
 
     def update(self):
-        pass
+        self.install()
 
 
 def uninstall_usercrontab(name, options):



More information about the Checkins mailing list