[Checkins] SVN: lovely.recipe/trunk/ - INCOMPATIBLE CHANGE: When creating directories the path used to be
Christian Zagrodnick
cz at gocept.com
Mon Oct 20 08:32:05 EDT 2008
Log message for revision 92400:
- INCOMPATIBLE CHANGE: When creating directories the path used to be
automatically joined with the buildout:directory. This was removed in favour
of explicit joining in buildout.cfg.
/me hopes this is okay :)
Changed:
U lovely.recipe/trunk/CHANGES.txt
U lovely.recipe/trunk/src/lovely/recipe/fs/README.txt
U lovely.recipe/trunk/src/lovely/recipe/fs/mkdir-root.txt
U lovely.recipe/trunk/src/lovely/recipe/fs/mkdir.py
-=-
Modified: lovely.recipe/trunk/CHANGES.txt
===================================================================
--- lovely.recipe/trunk/CHANGES.txt 2008-10-20 12:24:29 UTC (rev 92399)
+++ lovely.recipe/trunk/CHANGES.txt 2008-10-20 12:32:03 UTC (rev 92400)
@@ -16,6 +16,10 @@
- Added a way to change the owner of created directories.
+- INCOMPATIBLE CHANGE: When creating directories the path used to be
+ automatically joined with the buildout:directory. This was removed in favour
+ of explicit joining in buildout.cfg.
+
2008/07/16 0.3.1b8
==================
Modified: lovely.recipe/trunk/src/lovely/recipe/fs/README.txt
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/fs/README.txt 2008-10-20 12:24:29 UTC (rev 92399)
+++ lovely.recipe/trunk/src/lovely/recipe/fs/README.txt 2008-10-20 12:32:03 UTC (rev 92400)
@@ -13,11 +13,11 @@
...
... [data-dir]
... recipe = lovely.recipe:mkdir
- ... path = mystuff
+ ... path = ${buildout:directory}/mystuff
... """)
>>> print system(buildout),
Installing data-dir.
- data-dir: Creating directory mystuff
+ data-dir: Creating directory /sample-buildout/mystuff
>>> ls(sample_buildout)
- .installed.cfg
@@ -38,12 +38,12 @@
...
... [data-dir]
... recipe = lovely.recipe:mkdir
- ... path = otherdir
+ ... path = ${buildout:directory}/otherdir
... """)
>>> print system(buildout),
Uninstalling data-dir.
Installing data-dir.
- data-dir: Creating directory otherdir
+ data-dir: Creating directory /sample-buildout/otherdir
>>> ls(sample_buildout)
- .installed.cfg
@@ -65,7 +65,7 @@
...
... [data-dir]
... recipe = lovely.recipe:mkdir
- ... path = with/subdir
+ ... path = ${buildout:directory}/with/subdir
... """)
>>> print system(buildout),
Uninstalling data-dir.
@@ -86,12 +86,12 @@
... [data-dir]
... recipe = lovely.recipe:mkdir
... createpath = True
- ... path = with/subdir
+ ... path = ${buildout:directory}/with/subdir
... """)
>>> print system(buildout),
Installing data-dir.
data-dir: Creating parent directory /sample-buildout/with
- data-dir: Creating directory with/subdir
+ data-dir: Creating directory /sample-buildout/with/subdir
>>> ls(sample_buildout)
- .installed.cfg
@@ -121,7 +121,7 @@
... [data-dir]
... recipe = lovely.recipe:mkdir
... createpath = True
- ... path = another/with/subdir
+ ... path = ${buildout:directory}/another/with/subdir
... owner = nobody
... """)
>>> print system(buildout),
@@ -143,7 +143,7 @@
... [data-dir]
... recipe = lovely.recipe:mkdir
... createpath = True
- ... path = another/with/subdir
+ ... path = ${buildout:directory}/another/with/subdir
... owner = someuser
... """)
>>> print system(buildout),
Modified: lovely.recipe/trunk/src/lovely/recipe/fs/mkdir-root.txt
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/fs/mkdir-root.txt 2008-10-20 12:24:29 UTC (rev 92399)
+++ lovely.recipe/trunk/src/lovely/recipe/fs/mkdir-root.txt 2008-10-20 12:32:03 UTC (rev 92400)
@@ -12,7 +12,7 @@
... [data-dir]
... recipe = lovely.recipe:mkdir
... createpath = True
- ... path = with/subdir
+ ... path = ${buildout:directory}/with/subdir
... owner = nobody
... """)
>>> import os
@@ -20,8 +20,8 @@
>>> nobody_uid = pwd.getpwnam('nobody')[2]
>>> print system(buildout),
Installing data-dir.
- data-dir: Creating parent directory .../_TEST_/sample-buildout/with
- data-dir: Creating directory with/subdir
+ data-dir: Creating parent directory /sample-buildout/with
+ data-dir: Creating directory /sample-buildout/with/subdir
The owner of the subdir is changed:
Modified: lovely.recipe/trunk/src/lovely/recipe/fs/mkdir.py
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/fs/mkdir.py 2008-10-20 12:24:29 UTC (rev 92399)
+++ lovely.recipe/trunk/src/lovely/recipe/fs/mkdir.py 2008-10-20 12:32:03 UTC (rev 92400)
@@ -10,11 +10,6 @@
self.buildout = buildout
self.name = name
self.options = options
- self.originalPath = options['path']
- options['path'] = os.path.join(
- buildout['buildout']['directory'],
- self.originalPath,
- )
owner = options.get('owner')
if owner:
try:
@@ -48,7 +43,7 @@
if not os.path.isdir(path):
logging.getLogger(self.name).info(
- 'Creating directory %s', self.originalPath)
+ 'Creating directory %s', self.options['path'])
os.mkdir(path)
uid = self.options.get('owner-uid')
if uid is not None:
More information about the Checkins
mailing list