[chef] Re: Re: Should name be in the boilerplat e for metadata.rb… WAS: Re: Re: How to get test-kitche n to work when cookbook is named "cookbook-x"


Chronological Thread 
  • From: Mark Van De Vyver < >
  • To:
  • Subject: [chef] Re: Re: Should name be in the boilerplat e for metadata.rb… WAS: Re: Re: How to get test-kitche n to work when cookbook is named "cookbook-x"
  • Date: Fri, 16 Nov 2012 13:00:03 +1100

On Thu, Nov 15, 2012 at 6:31 AM, Bryan McLellan 
< >
 wrote:
> On Tue, Nov 13, 2012 at 5:47 PM, Jeffrey Hulten 
> < >
>  wrote:
>> I have run across a couple of cases where this bit me or others. Should 
>> the name attribute be added to the boilerplate metadata.rb?
>
> Patch already provided here awaiting review:
> http://tickets.opscode.com/browse/CHEF-3562
>
> There's an issue open that asks if name should be a required
> attribute: http://tickets.opscode.com/browse/CHEF-3490
>
> And yet another ticket to make name be the name of the cookbook rather
> than the directory: http://tickets.opscode.com/browse/CHEF-3307
>

Assume dependency resolution is handled by separate tools (Librarian,
Berkshelf, etc.)
There are two types of names:
 a) what is the name of this cookbook (some have the convention of the
folder or repo name), e.g. chef-ant or cookbook-ant, etc.
 b) What is the name of this cookbook when someone is trying to
satisfy the `depends` in another cookbook, e.g ant

It seems sensible to leave the the current `name` as optional with
meaning unchanged, and introduce `depends_name` (as a requirement?)
Where `depends_name` is the name of this cookbook when someone tries
to satisfy a depends requirement stated in another cookbook.

So you could have metadata.rb:

name chef-ant
depends_name ant

I'm only part way through writing a Librarian-chef source so I leave
it to more experienced hands to comment authoritatively, but so far it
seems that this is a useful addition that reflects the fact that
dependency resolution is often handled by tools that need to know
'what should other cookbooks know this cookbook as', yet are dealing
with source repo's and archives that have idiosyncratic naming
conventions.

Hopefully that makes sense.

Regards
Mark

> Bryan



Archive powered by MHonArc 2.6.16.

§