[Checkins] SVN: z3c.recipe.mkdir/branches/ulif-dont-del-olddirs/z3c/recipe/mkdir/README.txt Explain new option.
Uli Fouquet
uli at gnufix.de
Wed Aug 19 12:25:13 EDT 2009
Log message for revision 102978:
Explain new option.
Changed:
U z3c.recipe.mkdir/branches/ulif-dont-del-olddirs/z3c/recipe/mkdir/README.txt
-=-
Modified: z3c.recipe.mkdir/branches/ulif-dont-del-olddirs/z3c/recipe/mkdir/README.txt
===================================================================
--- z3c.recipe.mkdir/branches/ulif-dont-del-olddirs/z3c/recipe/mkdir/README.txt 2009-08-19 16:14:43 UTC (rev 102977)
+++ z3c.recipe.mkdir/branches/ulif-dont-del-olddirs/z3c/recipe/mkdir/README.txt 2009-08-19 16:25:13 UTC (rev 102978)
@@ -93,6 +93,74 @@
d myotherdir
+Creating directories that are removed on updates
+================================================
+
+We can tell, that a directory should be removed on updates by using
+the ``remove-on-update`` option:
+
+ >>> write('buildout.cfg',
+ ... '''
+ ... [buildout]
+ ... parts = mydir
+ ... offline = true
+ ...
+ ... [mydir]
+ ... recipe = z3c.recipe.mkdir
+ ... remove-on-update = true
+ ... paths = newdir
+ ... ''')
+
+ >>> print system(join('bin', 'buildout')),
+ Uninstalling mydir.
+ Installing mydir.
+ mydir: created path: /sample-buildout/newdir
+
+The ``newdir/`` directory was created:
+
+ >>> ls('.')
+ - .installed.cfg
+ d bin
+ - buildout.cfg
+ d develop-eggs
+ d eggs
+ d newdir
+ d parts
+
+We rewrite `buildout.cfg` and set a different path:
+
+ >>> write('buildout.cfg',
+ ... '''
+ ... [buildout]
+ ... parts = mydir
+ ... offline = true
+ ...
+ ... [mydir]
+ ... recipe = z3c.recipe.mkdir
+ ... remove-on-update = true
+ ... paths = newdir2
+ ... ''')
+
+ >>> print system(join('bin', 'buildout')),
+ Uninstalling mydir.
+ Installing mydir.
+ mydir: created path: /sample-buildout/newdir2
+
+Now ``newdir/`` has vanished and ``newdir2`` exists:
+
+ >>> ls('.')
+ - .installed.cfg
+ d bin
+ - buildout.cfg
+ d develop-eggs
+ d eggs
+ d newdir2
+ d parts
+
+Note, that the created directory will be removed on next modification
+of `buildout.cfg`.
+
+
Creating relative paths
=======================
More information about the Checkins
mailing list