From 116a782e020cc2281d881569f716aeb934b64c5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 1 Feb 2021 07:45:33 +0100
Subject: [PATCH] software/slapos-testing: add back required versions pins

217f7f055 (slapos-testing: don't pin tested eggs, 2021-01-12) was wrong,
some versions needs to be pinned for initial installation of the software.
The problem was not visible when the software was already installed and
updated in place, but when installing software from scratch, it was failing
very early with an error like:

    While:
      Bootstrapping.
      Getting distribution for 'slapos.libnetworkcache'.
    Error: Picked: slapos.libnetworkcache = 0.20
---
 software/slapos-testing/software.cfg | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/software/slapos-testing/software.cfg b/software/slapos-testing/software.cfg
index 4bccfd480..fdeded684 100644
--- a/software/slapos-testing/software.cfg
+++ b/software/slapos-testing/software.cfg
@@ -203,22 +203,29 @@ output = ${buildout:directory}/template.cfg
 mode = 640
 
 [versions]
-# clear version pins of tested eggs, to make sure buildout always use the
-# git checkout version.
+# When possible, clear version pins of tested eggs, to make sure buildout
+# always use the git checkout version.
+# This is not possible for buildout extensions, or for buildout recipes
+# that are also used in this profile, so we keep version pins for these.
+# We need to keep the versions in the profiles (in stack/slapos.cfg, or
+# maybe here during development) in sync with the latest version from their
+# setup.py , because if the version in setup.py is newer from the version
+# pin, buildout will install the egg from pypi and run the test against
+# released egg
 caucase =
 erp5.util =
 kedifa =
 slapos.cookbook =
 slapos.core =
-slapos.libnetworkcache =
-slapos.rebootstrap =
-slapos.recipe.build =
-slapos.recipe.cmmi =
+# slapos.libnetworkcache =
+# slapos.rebootstrap =
+# slapos.recipe.build =
+# slapos.recipe.cmmi =
 slapos.recipe.template =
 slapos.toolbox =
 rubygemsrecipe =
 
-# All depencies should be pinned.
+# All other depencies should be pinned.
 Pygments = 2.1.3
 zc.lockfile = 1.4
 bcrypt = 3.1.4
-- 
2.30.9