Ticket #8278 (closed Bug: wontfix)

Opened 4 years ago

Last modified 3 years ago

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

Wichert, is this yours or Martin's territory?

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 = 
    2323# e.g.: develop = src/my.package 
    2424develop = 
    2525 
     26[versions] 
     27plone.app.customerize = 1.1.2 
     28 
    2629[plone] 
    2730recipe = plone.recipe.plone>=3.1.1,<3.2dev 
     31eggs = plone.app.customerize 
    2832 
    2933[zope2] 
    3034recipe = 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/  
    11[buildout] 
    22eggs-directory=/opt/zope/installer/Plone-3.1.3-UnifiedInstaller/foo/buildout-cache/eggs 
    33download-cache=/opt/zope/installer/Plone-3.1.3-UnifiedInstaller/foo/buildout-cache/downloads 
    44newest = false 
    55parts = 
    66    plone 
    77    zope2 
    88    productdistros 
    99    instance 
    1010    zopepy 
    1111    precompile 
    1212    chown 
    1313    unifiedinstaller 
    1414 
    1515# Add additional egg download sources here. dist.plone.org contains archives 
    1616# of Plone packages. 
    1717find-links = 
    1818    http://dist.plone.org 
    1919    http://download.zope.org/ppix/ 
    2020    http://download.zope.org/distribution/ 
    2121    http://effbot.org/downloads 
    2222 
    2323# Add additional eggs here 
    2424# elementtree is required by Plone 
    2525eggs = 
    2626    elementtree 
    2727    FeedParser 
    2828     
    2929# Reference any eggs you are developing here, one per line 
    3030# e.g.: develop = src/my.package 
    3131develop = 
    3232 
     33[versions] 
     34plone.app.customerize = 1.1.2 
     35 
    3336[plone] 
    3437recipe = plone.recipe.plone >=3.1.1, < 3.2dev 
     38eggs = plone.app.customerize 
    3539 
    3640[zope2] 
    3741recipe = plone.recipe.zope2install 
    3842url = ${plone:zope2-url} 
    3943 
    4044# Use this section to download additional old-style products. 
    4145# List any number of URLs for product tarballs under URLs (separate 
    4246# with whitespace, or break over several lines, with subsequent lines 
    4347# indented). If any archives contain several products inside a top-level 
    4448# directory, list the archive file name (i.e. the last part of the URL,  
    4549# normally with a .tar.gz suffix or similar) under 'nested-packages'. 
    4650# If any archives extract to a product directory with a version suffix, list 
    4751# the archive name under 'version-suffix-packages'. 
    4852[productdistros] 
    4953recipe = plone.recipe.distros 
    5054urls = 
    5155nested-packages = 
    5256version-suffix-packages =  
    5357 
    5458[instance] 
    5559recipe = plone.recipe.zope2instance 
    5660zope2-location = ${zope2:location} 
    5761# The line below sets only the initial password. It will not change an 
    5862# existing password. 
    5963user = admin:dvs8aReY 
    6064http-address = 8080 
    6165#effective-user = __EFFECTIVE_USER__ 
    6266#debug-mode = on 
    6367#verbose-security = on 
    6468 
    6569# If you want Zope to know about any additional eggs, list them here. 
    6670# This should include any development eggs you listed in develop-eggs above, 
    6771# e.g. eggs = ${buildout:eggs} ${plone:eggs} my.package 
    6872eggs = 
    6973    ${buildout:eggs} 
    7074    ${plone:eggs} 
    7175 
    7276# If you want to register ZCML slugs for any packages, list them here. 
    7377# e.g. zcml = my.package my.other.package 
    7478zcml =  
    7579 
    7680products = 
    7781    ${buildout:directory}/products 
    7882    ${productdistros:location} 
    7983    ${plone:products} 
    8084 
    8185[zopepy] 
    8286recipe = zc.recipe.egg 
    8387eggs = ${instance:eggs} 
    8488interpreter = zopepy 
    8589extra-paths = ${zope2:location}/lib/python 
    8690scripts = zopepy 
    8791 
    8892 
    8993[precompile] 
    9094recipe = plone.recipe.precompiler 
    9195 
    9296 
    9397[chown] 
    9498# This recipe is used to set permissions -- and ownership for root mode installs 
    9599recipe = plone.recipe.command 
    96100command = 
    97101    chmod 600 .installed.cfg 
    98102 
    99103 
    100104 
    101105update-command = ${chown:command} 
    102106 
    103107 
    104108[unifiedinstaller] 
    105109recipe = plone.recipe.unifiedinstaller 
    106110user = ${instance:user} 
    107111primary-port = ${instance:http-address} 
    108112sudo-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

comment:17 Changed 3 years ago by hannosch

  • Milestone changed from 3.x to 3.3
Note: See TracTickets for help on using tickets.