[Checkins] SVN: zc.buildout/trunk/ Fixed a bug in the install
command. Parts that installed parts
Jim Fulton
jim at zope.com
Thu Dec 7 08:45:17 EST 2006
Log message for revision 71477:
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.
Changed:
U zc.buildout/trunk/CHANGES.txt
U zc.buildout/trunk/src/zc/buildout/buildout.py
U zc.buildout/trunk/src/zc/buildout/buildout.txt
-=-
Modified: zc.buildout/trunk/CHANGES.txt
===================================================================
--- zc.buildout/trunk/CHANGES.txt 2006-12-07 10:21:51 UTC (rev 71476)
+++ zc.buildout/trunk/CHANGES.txt 2006-12-07 13:45:16 UTC (rev 71477)
@@ -20,6 +20,16 @@
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)
=====================
Modified: zc.buildout/trunk/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/buildout.py 2006-12-07 10:21:51 UTC (rev 71476)
+++ zc.buildout/trunk/src/zc/buildout/buildout.py 2006-12-07 13:45:16 UTC (rev 71477)
@@ -156,7 +156,7 @@
['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 @@
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 @@
# 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)
Modified: zc.buildout/trunk/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/trunk/src/zc/buildout/buildout.txt 2006-12-07 10:21:51 UTC (rev 71476)
+++ zc.buildout/trunk/src/zc/buildout/buildout.txt 2006-12-07 13:45:16 UTC (rev 71477)
@@ -1115,9 +1115,8 @@
>>> 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 @@
...
... [d4]
... recipe = recipes:mkdir
- ... path = data4
+ ... path = ${d2:path}-extra
...
... [debug]
... recipe = recipes:debug
@@ -1231,7 +1230,7 @@
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 @@
- 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 @@
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 @@
d bin
- buildout.cfg
d data2
+ d data2-extra
d data3
- d data4
d develop-eggs
d eggs
d parts
More information about the Checkins
mailing list