构建不尊重固定版本

发布于 2025-01-03 04:25:31 字数 5209 浏览 0 评论 0原文

从 aa buildot 收到这个奇怪的错误。该构建适用于 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。

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

关于如何摆脱这个问题或者为什么版本固定在这里不起作用的任何想法?

Getting this weird error from a a buildot. The buildout is for plone3 and has versions pinned.

$ 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'.

If I delete the fake eggs I get

$ 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'))

So it seems that collective.recipe.filestorage requires plone.recipe.zope2instance. zope2instance is pinned to 2.7 however during the buildout recipe initialistion this version isn't used and 4.2 is picked instead.

If I remove filestorage from parts the buildout works fine, and the annotate shows the version is currently pinned.

Any ideas on how to get out of this or why the version pinning isn't working here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

無心 2025-01-10 04:25:31

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

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

You probably are using some add-ons with advanced dependency: Using the plone.app.discussion goodversion helped me very often (I don't mean to add also plone.app.discussion product)!

[buildout]
...
extends =
    ...
    http://good-py.appspot.com/release/plone.app.discussion/1.0
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文