Commit 06d5ca82 authored by jim's avatar jim

Fixed a bug in the install command. Parts that installed parts

depended on were installed too.  This is nice under normal
circumstances, but when the install command is used with a list of
parts, then the promise is that *only* those parts will be installed.
This is an important use case, because it can speed development.


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@71477 62d5b8a3-27da-0310-9561-8e5933582275
parent 5c04be0b
......@@ -20,6 +20,16 @@ priorities include:
Change History
**************
1.0.0b15 (2006-12-07)
=====================
Bugs Fixed
----------
- When the install command is used with a list of parts, only
those parts are supposed to be installed, but the buildout was also
building parts that those parts depended on.
1.0.0b14 (2006-12-05)
=====================
......
......@@ -156,7 +156,7 @@ class Buildout(UserDict.DictMixin):
['zc.buildout'], ws, sys.executable,
self['buildout']['bin-directory'])
def install(self, install_parts):
def install(self, install_args):
self._load_extensions()
self._setup_directories()
......@@ -185,7 +185,8 @@ class Buildout(UserDict.DictMixin):
installed_parts = installed_part_options['buildout']['parts']
installed_parts = installed_parts and installed_parts.split() or []
if install_parts:
if install_args:
install_parts = install_args
uninstall_missing = False
else:
install_parts = conf_parts
......@@ -193,7 +194,8 @@ class Buildout(UserDict.DictMixin):
# load and initialize recipes
[self[part]['recipe'] for part in install_parts]
install_parts = self._parts
if not install_args:
install_parts = self._parts
if self._log_level <= logging.DEBUG:
sections = list(self)
......
......@@ -1115,9 +1115,8 @@ argument.
>>> os.remove(os.path.join(sample_buildout, 'other.cfg'))
>>> os.remove(os.path.join(sample_buildout, '.other.cfg'))
The most commonly used command is 'install' and it takes a
list of parts to install. if any parts are specified, then they must
be listed in the buildout parts option and only those parts are
The most commonly used command is 'install' and it takes a list of
parts to install. if any parts are specified, only those parts are
installed. To illustrate this, we'll update our configuration and run
the buildout in the usual way:
......@@ -1216,7 +1215,7 @@ Now we'll update our configuration file:
...
... [d4]
... recipe = recipes:mkdir
... path = data4
... path = ${d2:path}-extra
...
... [debug]
... recipe = recipes:debug
......@@ -1231,7 +1230,7 @@ and run the buildout specifying just d3 and d4:
buildout: Installing d3
d3: Creating directory data3
buildout: Installing d4
d4: Creating directory data4
d4: Creating directory data2-extra
>>> ls(sample_buildout)
- .installed.cfg
......@@ -1242,14 +1241,14 @@ and run the buildout specifying just d3 and d4:
- buildout.cfg
d d1
d d2
d data2-extra
d data3
d data4
d develop-eggs
d eggs
d parts
d recipes
Only the d3 and d4 recipes ran. d3 was removed and data3 and data4
Only the d3 and d4 recipes ran. d3 was removed and data3 and data2-extra
were created.
The .installed.cfg is only updated for the recipes that ran:
......@@ -1283,9 +1282,9 @@ The .installed.cfg is only updated for the recipes that ran:
recipe = recipes:mkdir
<BLANKLINE>
[d4]
__buildout_installed__ = /sample-buildout/data4
__buildout_installed__ = /sample-buildout/data2-extra
__buildout_signature__ = recipes-PiIFiO8ny5yNZ1S3JfT0xg==
path = /sample-buildout/data4
path = /sample-buildout/data2-extra
recipe = recipes:mkdir
Note that the installed data for debug, d1, and d2 haven't changed,
......@@ -1318,8 +1317,8 @@ also see that d1 and d2 have gone away:
d bin
- buildout.cfg
d data2
d data2-extra
d data3
d data4
d develop-eggs
d eggs
d parts
......
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