Ticket #8278 (closed Bug: wontfix)
Pinning not possible in plone.recipe.plone; need to update to trunk
| Reported by: | pupq | Owned by: | optilude |
|---|---|---|---|
| Priority: | major | Milestone: | 3.3 |
| Component: | Infrastructure | Keywords: | |
| Cc: | grahamperrin |
Description
The README for plone.recipe.plone says that you can override plone's eggs like
[plone] eggs = plone.app.customerize=1.1.1.1
to use 1.1.1.1 instead of the 1.1.1 that is normally req'd for plone 3.1.3
But this syntax is broken in plone.recipe.plone. The change is already made, 6 mo ago, but it's not rolled out in plone.recipe.plone as used by us.
This is a problem, since it prevents overriding eggs (and the customerize example is a good case, as it got killed inadvertantly by a bug in 3.1.3)
Change History
comment:1 Changed 4 years ago by hannosch
- Owner changed from nobody to wichert
- Component changed from Unknown to Infrastructure
comment:2 Changed 4 years ago by wichert
- Owner changed from wichert to optilude
Martin's I'ld say.
The bug submitter is incorrect here as well: you can list an egg in the eggs= line for the plone part and specify the desired revision number in a [versions] block in buildout. For example:
[buildout] versions = versions [versions] plone.app.customerize=1.1.1.1 [plone] recipe = plone.recipe.plone eggs = plone.app.customerize
comment:3 follow-up: ↓ 5 Changed 4 years ago by optilude
- Owner changed from optilude to pupq
Joel,
I'm not sure I understand your report.
I think this would work:
[plone] eggs = plone.app.customerize==1.1.1.1
Note ==, not =.
Versions blocks should work too, though.
plone.recipe.plone is re-released for each Plone version, so if you fixed this, then unless it was in an unused branch, then the fix must be there.
Can you clarify?
comment:4 Changed 4 years ago by witsch
Replying to wichert:
The bug submitter is incorrect here as well: you can list an egg in the eggs= line for the plone part and specify the desired revision number in a [versions] block in buildout. For example:
hah! i just wanted to post the same... :) the correct version for the updated plone.app.customerize release is 1.1.2, though, not "1.1.1.1".
and you don't even need the "versions = versions" in the "[buildout]" section, btw, the following diff to a standard buildout.cfg as created by paster is enough:
-
buildout.cfg
diff --git a/buildout.cfg b/buildout.cfg index 78901c3..bd724c4 100644
a b eggs = 23 23 # e.g.: develop = src/my.package 24 24 develop = 25 25 26 [versions] 27 plone.app.customerize = 1.1.2 28 26 29 [plone] 27 30 recipe = plone.recipe.plone>=3.1.1,<3.2dev 31 eggs = plone.app.customerize 28 32 29 33 [zope2] 30 34 recipe = plone.recipe.zope2install
but of course explicit is always better than implicit... ;)
comment:5 in reply to: ↑ 3 Changed 4 years ago by witsch
Replying to optilude:
I think this would work: ![...] Note ==, not =.
no, it doesn't. i've just tried several combinations and so far only the "[versions]" approach wichert mentioned seems to work.
comment:6 Changed 4 years ago by wichert
Martin: plone.recipe.plone releases are made by copying the last tag and updating it. The last time I tried to make a new release based on its trunk something break badly, so I have not used trunk in ages.
comment:7 follow-up: ↓ 8 Changed 4 years ago by optilude
- Status changed from new to assigned
- Owner changed from pupq to optilude
Ah, the pieces are coming together now.
Is it worth trying to fix this, or should we just update the docs to say to use the versions block?
comment:8 in reply to: ↑ 7 Changed 4 years ago by witsch
Replying to optilude:
Is it worth trying to fix this, or should we just update the docs to say to use the versions block?
i'd say the latter — why put in extra work for something buildout already supports?
comment:9 Changed 4 years ago by wichert
I'm with witsch here. We already have a method to do this, so there is no need to invent another.
comment:10 Changed 4 years ago by witsch
the following is visualizes the differences between the buildout.cfg as provided by the "Unified Installer" for Plone 3.1.3 and the version needed to upgrade to plone.app.customerize 1.1.2:
-
zinstance/buildout.cfg
diff --git zinstance/buildout.cfg b/zinstance/buildout.cfg index 4ecf0ad..95ad0a4 100644
b/ 1 1 [buildout] 2 2 eggs-directory=/opt/zope/installer/Plone-3.1.3-UnifiedInstaller/foo/buildout-cache/eggs 3 3 download-cache=/opt/zope/installer/Plone-3.1.3-UnifiedInstaller/foo/buildout-cache/downloads 4 4 newest = false 5 5 parts = 6 6 plone 7 7 zope2 8 8 productdistros 9 9 instance 10 10 zopepy 11 11 precompile 12 12 chown 13 13 unifiedinstaller 14 14 15 15 # Add additional egg download sources here. dist.plone.org contains archives 16 16 # of Plone packages. 17 17 find-links = 18 18 http://dist.plone.org 19 19 http://download.zope.org/ppix/ 20 20 http://download.zope.org/distribution/ 21 21 http://effbot.org/downloads 22 22 23 23 # Add additional eggs here 24 24 # elementtree is required by Plone 25 25 eggs = 26 26 elementtree 27 27 FeedParser 28 28 29 29 # Reference any eggs you are developing here, one per line 30 30 # e.g.: develop = src/my.package 31 31 develop = 32 32 33 [versions] 34 plone.app.customerize = 1.1.2 35 33 36 [plone] 34 37 recipe = plone.recipe.plone >=3.1.1, < 3.2dev 38 eggs = plone.app.customerize 35 39 36 40 [zope2] 37 41 recipe = plone.recipe.zope2install 38 42 url = ${plone:zope2-url} 39 43 40 44 # Use this section to download additional old-style products. 41 45 # List any number of URLs for product tarballs under URLs (separate 42 46 # with whitespace, or break over several lines, with subsequent lines 43 47 # indented). If any archives contain several products inside a top-level 44 48 # directory, list the archive file name (i.e. the last part of the URL, 45 49 # normally with a .tar.gz suffix or similar) under 'nested-packages'. 46 50 # If any archives extract to a product directory with a version suffix, list 47 51 # the archive name under 'version-suffix-packages'. 48 52 [productdistros] 49 53 recipe = plone.recipe.distros 50 54 urls = 51 55 nested-packages = 52 56 version-suffix-packages = 53 57 54 58 [instance] 55 59 recipe = plone.recipe.zope2instance 56 60 zope2-location = ${zope2:location} 57 61 # The line below sets only the initial password. It will not change an 58 62 # existing password. 59 63 user = admin:dvs8aReY 60 64 http-address = 8080 61 65 #effective-user = __EFFECTIVE_USER__ 62 66 #debug-mode = on 63 67 #verbose-security = on 64 68 65 69 # If you want Zope to know about any additional eggs, list them here. 66 70 # This should include any development eggs you listed in develop-eggs above, 67 71 # e.g. eggs = ${buildout:eggs} ${plone:eggs} my.package 68 72 eggs = 69 73 ${buildout:eggs} 70 74 ${plone:eggs} 71 75 72 76 # If you want to register ZCML slugs for any packages, list them here. 73 77 # e.g. zcml = my.package my.other.package 74 78 zcml = 75 79 76 80 products = 77 81 ${buildout:directory}/products 78 82 ${productdistros:location} 79 83 ${plone:products} 80 84 81 85 [zopepy] 82 86 recipe = zc.recipe.egg 83 87 eggs = ${instance:eggs} 84 88 interpreter = zopepy 85 89 extra-paths = ${zope2:location}/lib/python 86 90 scripts = zopepy 87 91 88 92 89 93 [precompile] 90 94 recipe = plone.recipe.precompiler 91 95 92 96 93 97 [chown] 94 98 # This recipe is used to set permissions -- and ownership for root mode installs 95 99 recipe = plone.recipe.command 96 100 command = 97 101 chmod 600 .installed.cfg 98 102 99 103 100 104 101 105 update-command = ${chown:command} 102 106 103 107 104 108 [unifiedinstaller] 105 109 recipe = plone.recipe.unifiedinstaller 106 110 user = ${instance:user} 107 111 primary-port = ${instance:http-address} 108 112 sudo-command =
comment:11 follow-up: ↓ 12 Changed 4 years ago by pupq
Yes, I had the syntax wrong. I should be:
plone.app.customerize==1.1.2
not
plone.app.customerize=1.1.2
(1.1.1.1, btw, was just an example of an theoretical future egg; 1.1.2 hasn't been written at the time I submitted this bug).
However, using the syntax described above was the syntax that the documentation for plone.recipe.plone suggested--and it didn't work, and still doesn't.
This bug was -already- fixed in changeset https://dev.plone.org/plone/changeset/18969; for some reason, that's not the version that shipped with a new universal-installer installation (unless my setup is seriously screwed up, somehow).
Moving to supporting just [versions] seems fine--though it does seem the fix-in-plone syntax is nice and simple to understand. Might be nice to have.
Sorry I missed your earlier questions; for some reason, I don't seem to be getting email from Trac.
And, hw
comment:12 in reply to: ↑ 11 Changed 4 years ago by witsch
hi joel,
Replying to pupq:
Yes, I had the syntax wrong. I should be:
plone.app.customerize==1.1.2
not
plone.app.customerize=1.1.2
i'm afraid that's not correct. specifying an egg version in the [plone] section is not supported atm (see discussion above), neither with = nor ==. you'll need to use a [versions] section like described above, and there you'll have to use a =, i.e. single equal sign. == won't work — i've just tried again with a fresh buildout...
(1.1.1.1, btw, was just an example of an theoretical future egg; 1.1.2 hasn't been written at the time I submitted this bug).
i know — my comment was meant more as an info rather than a correction... :)
However, using the syntax described above was the syntax that the documentation for plone.recipe.plone suggested--and it didn't work, and still doesn't.
yes, we've already agreed plone.recipe.plone doesn't need support for this (since buildout already has it), so it should be dropped and the docs updated. well, at least wichert and i did... :)
This bug was -already- fixed in changeset https://dev.plone.org/plone/changeset/18969; for some reason, that's not the version that shipped with a new universal-installer installation (unless my setup is seriously screwed up, somehow).
you're right — as wichert pointed out above, there hasn't been a new release (of the recipe) based on trunk in a while, so the fix never made it into the installer or any of the versions used for buildouts.
Moving to supporting just [versions] seems fine--though it does seem the fix-in-plone syntax is nice and simple to understand. Might be nice to have.
yes, saving two lines might be more convenient, but we don't really need to support and maintain the same feature twice, imho. also, plone.recipe.plone will hopefully be phased out eventually anyway...
And, hw
thanks, and the same for you! :)
comment:13 follow-up: ↓ 14 Changed 4 years ago by maurits
I would just like to say that "versions = versions" is definitely needed. With this wrong buildout.cfg:
[buildout] [versions] plone.app.customerize=1.1.2 [plone] recipe = plone.recipe.plone eggs = plone.app.customerize
the versions section is totally ignored. The only effect is in the plone section: plone.app.customerize is 'unpinned'. It works like you want to only because version 1.1.2 is the most recent release. Come 1.1.3 and you will get that one, despite that versions section.
Try changing the version to 1.1.1 for example and notice that 1.1.2 will keep getting used unless you have 'versions = versions'.
See my weblog for some things I have learned about buildout and versions.
comment:14 in reply to: ↑ 13 Changed 4 years ago by witsch
Replying to maurits:
I would just like to say that "versions = versions" is definitely needed.
well, it didn't seem necessary for me, but adding it surely can't hurt and will make absolutely sure things work, of course...
The only effect is in the plone section: plone.app.customerize is 'unpinned'. It works like you want to only because version 1.1.2 is the most recent release. Come 1.1.3 and you will get that one, despite that versions section.
right. i haven't tried with a newer version... :)
Try changing the version to 1.1.1 for example and notice that 1.1.2 will keep getting used unless you have 'versions = versions'.
ok, thanks for clarifying this.
See my weblog for some things I have learned about buildout and versions.
very helpful — especially wiggy's one-liner! ;)
comment:15 Changed 3 years ago by grahamperrin
- Cc grahamperrin added
I should aim to digest this ticket:8278 alongside my Error: Missing option: buildout:parts (when I try to make my .cfg as close as possible to cluster.cfg).
(I'm familiar with the blog entry, but what I thought I learnt from that seems less applicable when more recently I try I to re-order my own .cfg in line with cluster.cfg .)
comment:16 Changed 3 years ago by wichert
- Status changed from assigned to closed
- Resolution set to wontfix
I am closing this ticket for two reasons:
- Plone 3.2 and later no longer use plone.recipe.plone
- You can already use normal buildout version pins

Wichert, is this yours or Martin's territory?