Commit 503f1b13 authored by Yusei Tahara's avatar Yusei Tahara

Rename 'shared-part' to 'shared-parts'. Since the original option name is...

Rename 'shared-part' to 'shared-parts'. Since the original option name is 'parts', 'shared-parts' is consistent.
parent 4b749b0a
......@@ -30,7 +30,7 @@ Supported options
Specify the path in which this package is shared by many other
packages.
Shared-part should be defined in [buildout] section
Shared-parts should be defined in [buildout] section
Shared option is True or False
The package will be installed on path/name/hash of options.
......@@ -1017,7 +1017,7 @@ Use option ``shared`` to install a shared pacakge.
>>> os.mkdir(shared_dir)
If no shared-part is set, and shared is True, shared feature is not used:
If no shared-parts is set, and shared is True, shared feature is not used:
>>> write('buildout.cfg',
... """
... [buildout]
......@@ -1039,7 +1039,7 @@ If no shared-part is set, and shared is True, shared feature is not used:
building package
installing package
If shared-part is set and shared is True, build package failed, the build directory is removed, a build directory__complile__ is left for debugging
If shared-parts is set and shared is True, build package failed, the build directory is removed, a build directory__complile__ is left for debugging
>>> _ = system('mv %s/package-0.0.0.tar.gz %s/package-0.0.0.tar.gz.bak' % (src, src))
>>> import tarfile
>>> from io import BytesIO
......@@ -1056,7 +1056,7 @@ If shared-part is set and shared is True, build package failed, the build direct
... [buildout]
... newest = false
... parts = package
... shared-part = %s
... shared-parts = %s
...
... [package]
... recipe = slapos.recipe.cmmi
......@@ -1076,7 +1076,7 @@ If shared-part is set and shared is True, build package failed, the build direct
Installing package.
Error: System error
If shared-part is set and shared is True, package will be installed in shared_part/package/a hash of the recipe's configuration options
If shared-parts is set and shared is True, package will be installed in shared_part/package/a hash of the recipe's configuration options
>>> _ = system('mv %s/package-0.0.0.tar.gz.bak %s/package-0.0.0.tar.gz' % (src, src))
>>> print system(buildout) #doctest:+ELLIPSIS
package: shared directory .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... set for package
......@@ -1095,7 +1095,7 @@ Do nothing if one package has been installed.
... [buildout]
... newest = false
... parts = package
... shared-part = %s
... shared-parts = %s
...
... [package]
... recipe = slapos.recipe.cmmi
......@@ -1114,7 +1114,7 @@ If options change, reinstall in different location:
... [buildout]
... newest = false
... parts = package
... shared-part = %s
... shared-parts = %s
...
... [package]
... recipe = slapos.recipe.cmmi
......
......@@ -41,8 +41,8 @@ class Recipe(object):
options.update(platform_options)
shared = options.get('shared', '').lower()
if shared == 'true' and buildout['buildout'].get('shared-part', None):
shared_part = buildout['buildout'].get('shared-part', None)
if shared == 'true' and buildout['buildout'].get('shared-parts', None):
shared_part = buildout['buildout'].get('shared-parts', None)
shared = os.path.join(shared_part.strip().rstrip('/'), self.name)
if not os.path.exists(shared):
os.makedirs(shared)
......
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