Skip to content

Commit

Permalink
Remove case statement in metadata.rb
Browse files Browse the repository at this point in the history
Using node['platform_family'] causes knife cookbook test to fail
  • Loading branch information
Doug Ireton committed Nov 23, 2012
1 parent 4127fbd commit 99e80a3
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions metadata.rb
Expand Up @@ -15,15 +15,6 @@

supports "mac_os_x", ">= 10.6.0"

case node['platform_family']
when 'mac_os_x'
depends 'dmg'
when 'debian'
depends 'runit'
depends 'build-essential'
when 'rhel', 'fedora'
depends 'yum'
depends 'build-essential'
when 'windows'
depends 'windows'
%w{ dmg, runit, build-essential, yum, windows }.each do |cookbook|
depends cookbook
end

3 comments on commit 99e80a3

@mbbernstein
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't need the cookbook windows to run on Ubuntu. Please remove it

@dougireton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now there is no good way to specify per platform dependencies. When there is, this can be refactored.

@patcon
Copy link

@patcon patcon commented on 99e80a3 Jan 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per this issue, I think the convention going forward is to not depend on windows, and instead suggest it. Unless that's changed:
sous-chefs/mysql#9

This is mitigated by tests, but if a cookbook doesn't have any, best to keep it off, I'd say

Please sign in to comment.