我的app/目录中有以下Berksfile:
source "https://supermarket.chef.io"
cookbook "apt", "~> 3.0.0"
cookbook "nodejs", "~> 2.2"当我运行berks install (版本4.3.3)时,我得到:
Resolving cookbook dependencies...
Fetching cookbook index from https://supermarket.chef.io...
Using apt (3.0.0)
...我的应用程序目录包含一个Berksfile.lock,其中包含以下行
apt (3.0.0)在我的初始Berksfile中,我删除了cookbook apt行(第2行)。我希望伯克会用我的Berksfile.lock。但是,当我再次运行berks install时,我得到:
Resolving cookbook dependencies...
Fetching cookbook index from https://supermarket.chef.io...
Using apt (4.0.0)并且我的Berksfile.lock将使用新的apt版本进行更新。这是预期的行为吗?我预计berks update命令会出现这种行为...
发布于 2016-06-04 03:05:43
由于您已经删除了版本限制,Berks现在将查找并使用最新的可用版本,该版本将满足其管理的食谱指定的所有版本要求。显然,在您的情况下,apt版本4.0满足了您的所有第三方依赖版本要求。
发布于 2016-06-03 21:51:23
不要在Berksfile中指定版本约束,而是使用metadata.rb。这还可以确保在运行chef-client时使用正确的版本。
https://stackoverflow.com/questions/37615786
复制相似问题