[chef] More Berkshelf anomalies?


Chronological Thread 
  • From: "Fouts, Chris" < >
  • To: " " < >
  • Subject: [chef] More Berkshelf anomalies?
  • Date: Wed, 18 Mar 2015 19:17:45 +0000
  • Accept-language: en-US

I see two anomalies.

 

(Installed as gem, i.e., NOT ChefDk)

berks -v

3.2.3

 

I have a flexnet-monitoring cookbook, and its metadata.rb looks like:

 

name             'flexnet-monitoring'

(snip)     

version          '0.4.0'

 

 

I have an environment cookbook whose Berksfile looks like:

 

source "https://supermarket.chef.io"

 

metadata

 

# Community cookbooks

cookbook 'chef-client'

cookbook 'powershell'

cookbook 'push-jobs'

 

# Internal cookbooks

cookbook 'flexnet-monitoring',   git: ' :projectcookbooks/flexnet-monitoring.git'

 

 

…and the metadata.rb looks like

 

name             'mycookbook_env_dev'

(snip)     

version          '0.1.0'

 

depends          'flexnet-monitoring',               '~> 0.4.0'

 

 

Anomaly 1:

 

When I do a berks install I get

 

Unable to satisfy constraints on package flexnet-monitoring~> 0.4.0, which does not exist, due to solution constraint (mycookbook_env_dev = 0.1.0). Solution constraints that may result in a constraint on flexnet-monitoring~> 0.4.0: [(mycookbook_env_dev = 0.1.0) -> (flexnet-monitoring~> 0.4.0 >= 0.0.0)]

Missing artifacts: flexnet-monitoring~> 0.4.0

 

If I remove the version constraint from the mycookbook_env_dev’s metadata.rb file, that is,

 

name             'mycookbook_env_dev'

(snip)     

version          '0.1.0'

 

depends          'flexnet-monitoring’

 

…and do a berks install, I get

 

Fetching 'flexnet-monitoring' from :projectcookbooks/flexnet-monitoring.git (at master)

 

Using flexnet-monitoring (0.4.0) from :projectcookbooks/flexnet-monitoring.git (at master)

 

Why does having the ‘~>0.4.0’ constraint fail?

 

 

 

Anomaly 2:             

 

Now if I do a berks list, I get

 

  * flexnet-monitoring (0.4.0) from :projectcookbooks/flexnet-monitoring.git (at master)

 

 

And if I do berks shelf uninstall flexnet-monitoring, I get

 

Cookbook 'flexnet-monitoring' not found in the Berkshelf shelf!

 

Why?

 

Chris

 

 



  • [chef] More Berkshelf anomalies?, Fouts, Chris, 03/18/2015

Archive powered by MHonArc 2.6.16.

§