Howto use buildout version pins¶
When using Plone with buildout you want to be able to reproduce your environment with the same set of eggs, even if there were some new releases in between.
buildout 2.x¶
For buildout 2.x they implemented a lot of improvements for pinning versions.
allow-picked-versions
allow buildout to download pinned packages only. Not pinned but required packages will raise an Exception.show-picked-versions
shows a summary of picked versions after your first buildout run. You can copy’n’paste this into aversions.cfg
file.
buildout 1.x¶
Manually¶
Without pinning your eggs it will be impossible to reproduce the deployed buildout configuration in future. Use a this buildout extension for future projects to avoid this pitfall:
$ cd ~/sandbox/your_buildout_directory
$ echo "[versions]" > versions.cfg
$ bin/buildout -N -vvv | grep '^Picked' | sed 's/Picked: //' >> versions.cfg
-N
and/or-o
avoids buildout from downloading new packages.- Use
-vvv
to increase verbosity - Use grep to finds all occurrences of
Picked: ...
in output - Use
sed
to strip away thePicked:
string part - Use
>>
to append to this file
After running this command you should add the just generated versions.cfg
file to your existing buildout configuration as shown:
[buildout]
...
extends =
versions.cfg
...
versions = versions
...
buildout.dumppickedversions¶
buildout.dumppickedversions is a buildout extension that prints or
generates a versions.cfg
file with all not pinned eggs. You should use this
on all your future buildouts:
[buildout]
extensions =
...
buildout.dumppickedversions
dump-picked-versions-file = versions.cfg
...