- From: Mark Van De Vyver <
- Subject: [chef] Re: Re: Re: Re: Should name be in the bo ilerplate for metadata.rb… WAS: Re: Re: How to get tes t-kitchen to work when cookbook is named "cookbook-x"
- Date: Fri, 16 Nov 2012 15:21:48 +1100
On Fri, Nov 16, 2012 at 1:23 PM, Jay Feldblum
> That is similar to the "replaces" method in the cookbook metadata.
Good point. From what I know of librarian-chef it seems a required
`replaces`, which is how other cookbooks should interpret its
contents, e.g. ant, would be more useful than a required `name` that
could still be anything, e.g. chef-ant.
A required `name`, that can be arbitrary, would still seem to leave
open the question 'is this cookbook a candidate for the `depends` in
A small issue might be that `replaces` is not obviously descriptive of
what it provides, but it does have the significant advantage of being
a minimal change.
> Librarian-chef does not currently support dependency replacements, but
> there's no reason it couldn't in the future.
> On Thu, Nov 15, 2012 at 9:00 PM, Mark Van De Vyver
>> On Thu, Nov 15, 2012 at 6:31 AM, Bryan McLellan
>> > 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
>> Hopefully that makes sense.
>> > Bryan
Archive powered by MHonArc 2.6.16.