Commit 147a3217 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Xavier Thompson

Write .installed.cfg only once, in safe way and only if there's any change.

Also, updating a part does not put it anymore at the end of the list of
installed parts, that was making .installed.cfg too big.
parent a31ced28
This diff is collapsed.
...@@ -2648,10 +2648,10 @@ provide alternate locations, and even names for these directories:: ...@@ -2648,10 +2648,10 @@ provide alternate locations, and even names for these directories::
Creating directory '/sample-alt/work'. Creating directory '/sample-alt/work'.
Creating directory '/sample-alt/developbasket'. Creating directory '/sample-alt/developbasket'.
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Uninstalling d4.
Uninstalling d3.
Uninstalling d2. Uninstalling d2.
Uninstalling debug. Uninstalling debug.
Uninstalling d4.
Uninstalling d3.
>>> ls(alt) >>> ls(alt)
d basket d basket
......
...@@ -85,6 +85,8 @@ supply some input: ...@@ -85,6 +85,8 @@ supply some input:
File "/zc/buildout/buildout.py", line 1352, in main File "/zc/buildout/buildout.py", line 1352, in main
getattr(buildout, command)(args) getattr(buildout, command)(args)
File "/zc/buildout/buildout.py", line 383, in install File "/zc/buildout/buildout.py", line 383, in install
self._install_parts(install_args)
File buildout.py", line 791, in _install_parts
installed_files = self[part]._call(recipe.install) installed_files = self[part]._call(recipe.install)
File "/zc/buildout/buildout.py", line 961, in _call File "/zc/buildout/buildout.py", line 961, in _call
return f() return f()
......
...@@ -1507,7 +1507,7 @@ some evil recipes that exit uncleanly: ...@@ -1507,7 +1507,7 @@ some evil recipes that exit uncleanly:
>>> mkdir('recipes') >>> mkdir('recipes')
>>> write('recipes', 'recipes.py', >>> write('recipes', 'recipes.py',
... ''' ... '''
... import os ... import sys
... ...
... class Clean: ... class Clean:
... def __init__(*_): pass ... def __init__(*_): pass
...@@ -1515,10 +1515,10 @@ some evil recipes that exit uncleanly: ...@@ -1515,10 +1515,10 @@ some evil recipes that exit uncleanly:
... def update(_): pass ... def update(_): pass
... ...
... class EvilInstall(Clean): ... class EvilInstall(Clean):
... def install(_): os._exit(1) ... def install(_): sys.exit(1)
... ...
... class EvilUpdate(Clean): ... class EvilUpdate(Clean):
... def update(_): os._exit(1) ... def update(_): sys.exit(1)
... ''') ... ''')
>>> write('recipes', 'setup.py', >>> write('recipes', 'setup.py',
...@@ -1612,10 +1612,10 @@ Now let's look at 3 cases: ...@@ -1612,10 +1612,10 @@ Now let's look at 3 cases:
>>> print_(system(buildout+' buildout:parts='), end='') >>> print_(system(buildout+' buildout:parts='), end='')
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Uninstalling p2.
Uninstalling p1.
Uninstalling p4. Uninstalling p4.
Uninstalling p3. Uninstalling p3.
Uninstalling p2.
Uninstalling p1.
3. We exit while installing or updating after uninstalling: 3. We exit while installing or updating after uninstalling:
......
...@@ -443,8 +443,8 @@ Create a clean buildout.cfg w/o the checkenv recipe, and delete the recipe: ...@@ -443,8 +443,8 @@ Create a clean buildout.cfg w/o the checkenv recipe, and delete the recipe:
... """ % dict(server=link_server)) ... """ % dict(server=link_server))
>>> print_(system(buildout), end='') # doctest: +ELLIPSIS >>> print_(system(buildout), end='') # doctest: +ELLIPSIS
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Uninstalling checkenv.
Uninstalling extdemo. Uninstalling extdemo.
Uninstalling checkenv.
Installing extdemo... Installing extdemo...
>>> rmdir(sample_buildout, 'recipes') >>> rmdir(sample_buildout, 'recipes')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment