Commit f210c1d2 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Use relative path from buildout directory in .installed.cfg.

parent f7df58bb
...@@ -824,7 +824,8 @@ class Buildout(DictMixin): ...@@ -824,7 +824,8 @@ class Buildout(DictMixin):
self.installed_part_options[part] = saved_options self.installed_part_options[part] = saved_options
saved_options['__buildout_installed__' saved_options['__buildout_installed__'
] = '\n'.join(installed_files) ] = '\n'.join(installed_files).replace(
self._buildout_dir, '.')
saved_options['__buildout_signature__'] = signature saved_options['__buildout_signature__'] = signature
installed_parts = [p for p in installed_parts if p != part] installed_parts = [p for p in installed_parts if p != part]
...@@ -912,7 +913,7 @@ class Buildout(DictMixin): ...@@ -912,7 +913,7 @@ class Buildout(DictMixin):
return '\n'.join([os.path.join(dest, f) return '\n'.join([os.path.join(dest, f)
for f in os.listdir(dest) for f in os.listdir(dest)
if f not in old_files if f not in old_files
]) ]).replace(self._buildout_dir, '.')
finally: finally:
os.chdir(here) os.chdir(here)
...@@ -1559,8 +1560,11 @@ class Options(DictMixin): ...@@ -1559,8 +1560,11 @@ class Options(DictMixin):
result.update(self._cooked) result.update(self._cooked)
result.update(self._data) result.update(self._data)
for key, value in result.items(): for key, value in result.items():
value = value.replace(self.buildout._buildout_dir, '.')
if value.startswith(SERIALISED_VALUE_MAGIC): if value.startswith(SERIALISED_VALUE_MAGIC):
result[key] = loads(value) result[key] = loads(value)
else:
result[key] = value
return result return result
def _call(self, f): def _call(self, f):
......
...@@ -306,13 +306,13 @@ about the part we installed: ...@@ -306,13 +306,13 @@ about the part we installed:
>>> cat(sample_buildout, '.installed.cfg') >>> cat(sample_buildout, '.installed.cfg')
[buildout] [buildout]
installed_develop_eggs = /sample-buildout/develop-eggs/recipes.egg-link installed_develop_eggs = ./develop-eggs/recipes.egg-link
parts = data-dir parts = data-dir
<BLANKLINE> <BLANKLINE>
[data-dir] [data-dir]
__buildout_installed__ = /sample-buildout/mystuff __buildout_installed__ = ./mystuff
__buildout_signature__ = recipes-c7vHV6ekIDUPy/7fjAaYjg== __buildout_signature__ = recipes-c7vHV6ekIDUPy/7fjAaYjg==
path = /sample-buildout/mystuff path = ./mystuff
recipe = recipes:mkdir recipe = recipes:mkdir
Note that the directory we installed is included in .installed.cfg. Note that the directory we installed is included in .installed.cfg.
...@@ -1150,7 +1150,7 @@ It will still be treated as a part: ...@@ -1150,7 +1150,7 @@ It will still be treated as a part:
>>> cat('.installed.cfg') # doctest: +ELLIPSIS >>> cat('.installed.cfg') # doctest: +ELLIPSIS
[buildout] [buildout]
installed_develop_eggs = /sample-buildout/develop-eggs/recipes.egg-link installed_develop_eggs = ./develop-eggs/recipes.egg-link
parts = data-dir debug parts = data-dir debug
... ...
...@@ -1188,7 +1188,7 @@ It will still be treated as a part: ...@@ -1188,7 +1188,7 @@ It will still be treated as a part:
>>> cat('.installed.cfg') # doctest: +ELLIPSIS >>> cat('.installed.cfg') # doctest: +ELLIPSIS
[buildout] [buildout]
installed_develop_eggs = /sample-buildout/develop-eggs/recipes.egg-link installed_develop_eggs = ./develop-eggs/recipes.egg-link
parts = data-dir debug parts = data-dir debug
... ...
...@@ -2180,7 +2180,7 @@ is run before the directory is deleted. ...@@ -2180,7 +2180,7 @@ is run before the directory is deleted.
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Uninstalling dir. Uninstalling dir.
Running uninstall recipe. Running uninstall recipe.
backing up directory /sample-buildout/my_directory of size 0 backing up directory ./my_directory of size 0
Updating debug. Updating debug.
recipe recipes:debug recipe recipes:debug
...@@ -2373,7 +2373,7 @@ the buildout in the usual way: ...@@ -2373,7 +2373,7 @@ the buildout in the usual way:
>>> cat(sample_buildout, '.installed.cfg') >>> cat(sample_buildout, '.installed.cfg')
... # doctest: +NORMALIZE_WHITESPACE ... # doctest: +NORMALIZE_WHITESPACE
[buildout] [buildout]
installed_develop_eggs = /sample-buildout/develop-eggs/recipes.egg-link installed_develop_eggs = ./develop-eggs/recipes.egg-link
parts = debug d1 d2 d3 parts = debug d1 d2 d3
<BLANKLINE> <BLANKLINE>
[debug] [debug]
...@@ -2382,21 +2382,21 @@ the buildout in the usual way: ...@@ -2382,21 +2382,21 @@ the buildout in the usual way:
recipe = recipes:debug recipe = recipes:debug
<BLANKLINE> <BLANKLINE>
[d1] [d1]
__buildout_installed__ = /sample-buildout/d1 __buildout_installed__ = ./d1
__buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg== __buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg==
path = /sample-buildout/d1 path = ./d1
recipe = recipes:mkdir recipe = recipes:mkdir
<BLANKLINE> <BLANKLINE>
[d2] [d2]
__buildout_installed__ = /sample-buildout/d2 __buildout_installed__ = ./d2
__buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg== __buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg==
path = /sample-buildout/d2 path = ./d2
recipe = recipes:mkdir recipe = recipes:mkdir
<BLANKLINE> <BLANKLINE>
[d3] [d3]
__buildout_installed__ = /sample-buildout/d3 __buildout_installed__ = ./d3
__buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg== __buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg==
path = /sample-buildout/d3 path = ./d3
recipe = recipes:mkdir recipe = recipes:mkdir
Now we'll update our configuration file: Now we'll update our configuration file:
...@@ -2459,7 +2459,7 @@ The .installed.cfg is only updated for the recipes that ran: ...@@ -2459,7 +2459,7 @@ The .installed.cfg is only updated for the recipes that ran:
>>> cat(sample_buildout, '.installed.cfg') >>> cat(sample_buildout, '.installed.cfg')
... # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS ... # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
[buildout] [buildout]
installed_develop_eggs = /sample-buildout/develop-eggs/recipes.egg-link installed_develop_eggs = ./develop-eggs/recipes.egg-link
parts = debug d1 d2 d3 d4 parts = debug d1 d2 d3 d4
<BLANKLINE> <BLANKLINE>
[debug] [debug]
...@@ -2468,27 +2468,27 @@ The .installed.cfg is only updated for the recipes that ran: ...@@ -2468,27 +2468,27 @@ The .installed.cfg is only updated for the recipes that ran:
recipe = recipes:debug recipe = recipes:debug
<BLANKLINE> <BLANKLINE>
[d1] [d1]
__buildout_installed__ = /sample-buildout/d1 __buildout_installed__ = ./d1
__buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg== __buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg==
path = /sample-buildout/d1 path = ./d1
recipe = recipes:mkdir recipe = recipes:mkdir
<BLANKLINE> <BLANKLINE>
[d2] [d2]
__buildout_installed__ = /sample-buildout/d2 __buildout_installed__ = ./d2
__buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg== __buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg==
path = /sample-buildout/d2 path = ./d2
recipe = recipes:mkdir recipe = recipes:mkdir
<BLANKLINE> <BLANKLINE>
[d3] [d3]
__buildout_installed__ = /sample-buildout/data3 __buildout_installed__ = ./data3
__buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg== __buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg==
path = /sample-buildout/data3 path = ./data3
recipe = recipes:mkdir recipe = recipes:mkdir
<BLANKLINE> <BLANKLINE>
[d4] [d4]
__buildout_installed__ = /sample-buildout/data2-extra __buildout_installed__ = ./data2-extra
__buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg== d2:... __buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg== d2:...
path = /sample-buildout/data2-extra path = ./data2-extra
recipe = recipes:mkdir recipe = recipes:mkdir
Note that the installed data for debug, d1, and d2 haven't changed, Note that the installed data for debug, d1, and d2 haven't changed,
......
...@@ -99,19 +99,19 @@ computed by the egg recipe by looking at .installed.cfg: ...@@ -99,19 +99,19 @@ computed by the egg recipe by looking at .installed.cfg:
>>> cat(sample_buildout, '.installed.cfg') # doctest: +ELLIPSIS >>> cat(sample_buildout, '.installed.cfg') # doctest: +ELLIPSIS
[buildout] [buildout]
installed_develop_eggs = /sample-buildout/develop-eggs/sample.egg-link installed_develop_eggs = ./develop-eggs/sample.egg-link
parts = sample-part parts = sample-part
<BLANKLINE> <BLANKLINE>
[sample-part] [sample-part]
__buildout_installed__ = __buildout_installed__ =
__buildout_signature__ = sample-... setuptools-...egg zc.buildout-... zc.recipe.egg-... __buildout_signature__ = sample-... setuptools-...egg zc.buildout-... zc.recipe.egg-...
_b = /sample-buildout/bin _b = ./bin
_d = /sample-buildout/develop-eggs _d = ./develop-eggs
_e = /sample-buildout/eggs _e = ./eggs
bin-directory = /sample-buildout/bin bin-directory = ./bin
develop-eggs-directory = /sample-buildout/develop-eggs develop-eggs-directory = ./develop-eggs
eggs = demo<0.3 eggs = demo<0.3
eggs-directory = /sample-buildout/eggs eggs-directory = ./eggs
extras = other extras = other
find-links = http://localhost:27071/ find-links = http://localhost:27071/
index = http://localhost:27071/index index = http://localhost:27071/index
......
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