[Checkins] SVN: zc.recipe.cmmi/branches/1.2/ Bug fix: keep track of reused shared builds.

Thomas Lotze tl at gocept.com
Wed Aug 12 04:40:47 EDT 2009


Log message for revision 102701:
  Bug fix: keep track of reused shared builds.

Changed:
  U   zc.recipe.cmmi/branches/1.2/CHANGES.txt
  U   zc.recipe.cmmi/branches/1.2/src/zc/recipe/cmmi/__init__.py
  U   zc.recipe.cmmi/branches/1.2/src/zc/recipe/cmmi/shared.txt

-=-
Modified: zc.recipe.cmmi/branches/1.2/CHANGES.txt
===================================================================
--- zc.recipe.cmmi/branches/1.2/CHANGES.txt	2009-08-12 08:25:55 UTC (rev 102700)
+++ zc.recipe.cmmi/branches/1.2/CHANGES.txt	2009-08-12 08:40:47 UTC (rev 102701)
@@ -4,7 +4,7 @@
 1.2.1 (unreleased)
 ==================
 
-- Nothing changed yet.
+Bug fix: keep track of reused shared builds.
 
 
 1.2.0 (2009-05-18)

Modified: zc.recipe.cmmi/branches/1.2/src/zc/recipe/cmmi/__init__.py
===================================================================
--- zc.recipe.cmmi/branches/1.2/src/zc/recipe/cmmi/__init__.py	2009-08-12 08:25:55 UTC (rev 102700)
+++ zc.recipe.cmmi/branches/1.2/src/zc/recipe/cmmi/__init__.py	2009-08-12 08:40:47 UTC (rev 102701)
@@ -100,7 +100,7 @@
         if self.shared:
             if os.path.isdir(self.shared):
                 logger.info('using existing shared build')
-                return ()
+                return self.shared
             else:
                 os.mkdir(self.shared)
 

Modified: zc.recipe.cmmi/branches/1.2/src/zc/recipe/cmmi/shared.txt
===================================================================
--- zc.recipe.cmmi/branches/1.2/src/zc/recipe/cmmi/shared.txt	2009-08-12 08:25:55 UTC (rev 102700)
+++ zc.recipe.cmmi/branches/1.2/src/zc/recipe/cmmi/shared.txt	2009-08-12 08:40:47 UTC (rev 102701)
@@ -216,3 +216,28 @@
     echo installing foo
     installing foo
     <BLANKLINE>
+
+
+Regression: Keeping track of a reused shared build
+==================================================
+
+zc.recipe.cmmi 1.2 had a bug that manifested when reusing a shared build by a
+second buildout: The part wouldn't keep track of the shared build and thus
+wasn't able to restore it if it got deleted from the cache. Let's simulate the
+second buildout by removing .installed.cfg, then this is how it should work:
+
+    >>> remove('.installed.cfg')
+    >>> print system('bin/buildout')
+    Installing foo.
+    foo: using existing shared build
+
+    >>> rmdir(cache, 'cmmi', 'build')
+    >>> print system('bin/buildout')
+    Uninstalling foo.
+    Installing foo.
+    foo: Unpacking and configuring
+    configuring foo /cache/cmmi/build/...
+    echo building foo
+    building foo
+    echo installing foo
+    installing foo



More information about the Checkins mailing list