【问题标题】:buildout not respecting pinned version构建不尊重固定版本
【发布时间】:2012-02-13 06:55:24
【问题描述】:

从一个 buildot 中得到这个奇怪的错误。 buildout 是针对 plone3 的,并且有固定的版本。

$ bin/buildout -Nv 
While:
  Initializing.
  Getting section buildout.
  Initializing section buildout.
  Getting option buildout:parts.
  Getting section filestorage.
  Initializing section filestorage.
  Installing recipe collective.recipe.filestorage.
Error: There is a version conflict.
We already have: zope.location 0.0
but zope.site 3.9.2 requires 'zope.location>=3.7.0'.

如果我删除我得到的假鸡蛋

$ rm -r fake-eggs/
$ bin/buildout -Nvv
While:
  Initializing.
  Getting section buildout.
  Initializing section buildout.
  Getting option buildout:parts.
  Getting section filestorage.
  Initializing part filestorage.
  Getting section supervisor.
  Initializing section supervisor.
  Getting option supervisor:programs.
  Getting section instance1.
  Initializing section instance1.
  Getting option instance1:eggs.
  Getting section instance.
  Initializing section instance.
  Loading recipe 'plone.recipe.zope2instance==2.7'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1804, in main
    user_defaults, windows_restart, command)
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 252, in __init__
    options = self['buildout']
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1056, in __getitem__
    options._initialize()
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1130, in _initialize
    self._dosub(k, v)
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1177, in _dosub
    v = '$$'.join([self._sub(s, seen) for s in v.split('$$')])
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1241, in _sub
    v = self.buildout[section].get(option, None, seen)
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1056, in __getitem__
    options._initialize()
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1144, in _initialize
    self.recipe = recipe_class(buildout, name, self)
  File "/Users/dylanjay/Projects/csep/src/collective.recipe.filestorage/collective/recipe/filestorage/__init__.py", line 25, in __init__
    part = self.buildout[part_name]
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1056, in __getitem__
    options._initialize()
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1130, in _initialize
    self._dosub(k, v)
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1177, in _dosub
    v = '$$'.join([self._sub(s, seen) for s in v.split('$$')])
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1241, in _sub
    v = self.buildout[section].get(option, None, seen)
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1056, in __getitem__
    options._initialize()
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1130, in _initialize
    self._dosub(k, v)
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1177, in _dosub
    v = '$$'.join([self._sub(s, seen) for s in v.split('$$')])
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1241, in _sub
    v = self.buildout[section].get(option, None, seen)
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1056, in __getitem__
    options._initialize()
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1141, in _initialize
    recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
  File "/Users/dylanjay/Projects/download-cache/eggs/zc.buildout-1.5.2-py2.4.egg/zc/buildout/buildout.py", line 1078, in _install_and_load
    if pkg_resources.working_set.find(req) is None:
  File "/Users/dylanjay/Projects/download-cache/eggs/distribute-0.6.24-py2.4.egg/pkg_resources.py", line 474, in find
    raise VersionConflict(dist,req)     # XXX add more info
VersionConflict: (plone.recipe.zope2instance 4.2 (/Users/dylanjay/Projects/download-cache/eggs/plone.recipe.zope2instance-4.2-py2.4.egg), Requirement.parse('plone.recipe.zope2instance==2.7'))

因此,collective.recipe.filestorage 似乎需要 plone.recipe.zope2instance。 zope2instance 固定为 2.7,但是在构建配方初始化期间,不使用此版本,而是选择了 4.2。

如果我从部件中删除文件存储,则构建工作正常,并且注释显示版本当前已固定。

关于如何摆脱这种情况或为什么版本固定在这里不起作用的任何想法?

【问题讨论】:

    标签: plone buildout


    【解决方案1】:

    您可能正在使用一些具有高级依赖性的附加组件:使用 plone.app.discussion goodversion 对我很有帮助(我并不是要添加 plone.app.discussion 产品)!

    [buildout]
    ...
    extends =
        ...
        http://good-py.appspot.com/release/plone.app.discussion/1.0
    

    【讨论】:

    • 不,我认为这是由于 zc.buildout 和collective.filestorage 一起工作的方式出了问题。如前所述,版本已经固定。 good-py 只是固定版本。所以这无济于事。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-28
    • 2019-09-23
    • 2020-08-08
    • 1970-01-01
    相关资源
    最近更新 更多