- From: Jesse Campbell <
>
- To: Bryan McLellan <
>
- Cc: Chef Dev <
>
- Subject: [chef-dev] Re: Re: Re: local file copy resource?
- Date: Mon, 10 Dec 2012 18:43:00 -0500
pull request submitted, comment added to ticket:
https://github.com/opscode/chef/pull/528
http://tickets.opscode.com/browse/CHEF-3676
On Mon, Dec 10, 2012 at 1:07 PM, Bryan McLellan
<
>
wrote:
>
On Sun, Dec 9, 2012 at 1:44 PM, Jesse Campbell
>
<
>
>
wrote:
>
> Take a look here:
>
> https://github.com/jcam/chef/commits/expanded_file_resource
>
>
You could create pull request for this sort of patch, even if you're
>
not done. That would allow people to comment in the PR against the
>
specific parts of the code.
>
>
It looks like #action_create no longer differentiates between creating
>
a file that doesn't exist and updating the content of a file that does
>
exist. This seems minor, but my gut tells me it is important for Chef
>
to know the difference so we can be completely honest with the user
>
about what we did or are going to do, for purposes like whyrun,
>
auditing, reporting, etc.
>
>
I don't think I like overloading the 'create' action to also be a
>
'copy' action, differing on if a source file exists or not, as we're
>
not really creating a file.
>
>
In #action_move, you remote the source file if it already matches the
>
destination file. Conceptually this makes sense, but I'd be pretty
>
surprised if I asked Chef to move a file and it told me that it
>
deleted it instead.
>
>
#copy reports "create a new cookbook_file
>
"
>
but
>
is used in both Chef::File#action_move and Chef::File#action_create
>
(when copying a file). Again, we need to be accurate in what we're
>
reporting.
>
>
Personally the 'to' attribute made more sense to me than 'source.'
>
When I think about what I'm copying or what I'm moving, I think what I
>
am describing is the source, not the destination. But I can totally
>
see how this is possibly personal preference. We see this in
>
remote_file, cookbook_file and template today. The resource manages
>
the destination and there is a source attribute. In link, where we
>
already deal with two files on disk, we use 'to' since we realized
>
this made more sense in CHEF-30 [1].
>
>
Bryan
>
>
[1] http://tickets.opscode.com/browse/CHEF-30
- [chef-dev] local file copy resource?, Jesse Campbell, 12/08/2012
- [chef-dev] Re: local file copy resource?, Noah Kantrowitz, 12/08/2012
- [chef-dev] Re: local file copy resource?, Jesse Campbell, 12/08/2012
- [chef-dev] Re: Re: local file copy resource?, Bryan McLellan, 12/08/2012
- [chef-dev] Re: Re: local file copy resource?, Jesse Campbell, 12/09/2012
- [chef-dev] Re: Re: local file copy resource?, Jesse Campbell, 12/09/2012
- [chef-dev] Re: Re: local file copy resource?, Jesse Campbell, 12/09/2012
- [chef-dev] Re: Re: Re: local file copy resource?, Bryan McLellan, 12/10/2012
- [chef-dev] Re: Re: Re: local file copy resource?, Jesse Campbell, 12/10/2012
- [chef-dev] Re: Re: Re: local file copy resource?, Jesse Campbell, 12/10/2012
- Message not available
- [chef-dev] Re: Re: Re: local file copy resource?, Daniel DeLeo, 12/10/2012
- [chef-dev] Re: Re: Re: Re: local file copy resource?, Jesse Campbell, 12/10/2012
- [chef-dev] Re: Re: Re: Re: local file copy resource?, Daniel DeLeo, 12/11/2012
- [chef-dev] Re: Re: Re: Re: local file copy resource?, Jesse Campbell, 12/11/2012
- [chef-dev] Re: Re: Re: Re: local file copy resource?, Daniel DeLeo, 12/12/2012
- [chef-dev] Re: Re: Re: Re: local file copy resource?, Jesse Campbell, 12/12/2012
- [chef-dev] Re: Re: Re: Re: local file copy resource?, Jesse Campbell, 12/19/2012
- [chef-dev] Re: Re: Re: Re: Re: local file copy resource?, Zac Stevens, 12/12/2012
- [chef-dev] Re: Re: Re: Re: Re: local file copy resource?, Daniel DeLeo, 12/12/2012
- [chef-dev] Re: Re: Re: Re: Re: local file copy resource?, Zachary Stevens, 12/16/2012
Archive powered by MHonArc 2.6.16.