Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

adds create_if_missing to remote file action #8

Merged
merged 1 commit into from

3 participants

@videlalvaro

at the moment the source recipe was downloading nodejs source all the time. With this change is just downloaded the first time

@videlalvaro videlalvaro adds create_if_missing to remote file action
at the moment the source recipe was downloading nodejs source all the time. With this change is just downloaded the first time
1dec491
@mdxp
Owner

@videlalvaro thanks for the patch. Still, this should not be necessary as remote_file will do this by default. The only reason when this could happen is either if you have the wrong checksum for the file or there is some bug in chef. Can you pls. double-check that or let me know what version of node and what checksum you are using? Thx!

@JulesAU

Seems necessary to me - node 0.8.2 here, chef 0.10.8, always re-downloads:

[Tue, 14 Aug 2012 10:43:07 +0000] DEBUG: remote_file[/usr/local/src/node-v0.8.2.tar.gz] checking for changes
[Tue, 14 Aug 2012 10:43:07 +0000] DEBUG: Sending HTTP Request via GET to nodejs.org:80/dist/v0.8.2/node-v0.8.2.tar.gz
[Tue, 14 Aug 2012 10:43:07 +0000] DEBUG: Streaming download from http://nodejs.org/dist/v0.8.2/node-v0.8.2.tar.gz to tempfile /tmp/chef-rest20120814-11218-19gxyqs-0
[Tue, 14 Aug 2012 10:43:15 +0000] DEBUG: remote_file[/usr/local/src/node-v0.8.2.tar.gz] checking for file existence of /usr/local/src/node-v0.8.2.tar.gz
[Tue, 14 Aug 2012 10:43:15 +0000] DEBUG: remote_file[/usr/local/src/node-v0.8.2.tar.gz] file exists at /usr/local/src/node-v0.8.2.tar.gz
[Tue, 14 Aug 2012 10:43:15 +0000] DEBUG: remote_file[/usr/local/src/node-v0.8.2.tar.gz] target checksum: 6830ed4eaf6c191243fb3afbe3ca3283d7e3a537c8f3ce508fa2af1328fe4baf
[Tue, 14 Aug 2012 10:43:15 +0000] DEBUG: remote_file[/usr/local/src/node-v0.8.2.tar.gz] source checksum: 6830ed4eaf6c191243fb3afbe3ca3283d7e3a537c8f3ce508fa2af1328fe4baf
[Tue, 14 Aug 2012 10:43:15 +0000] DEBUG: remote_file[/usr/local/src/node-v0.8.2.tar.gz] target and source checksums are the same - not updating
@mdxp mdxp merged commit 51a2c2a into mdxp:master
@mdxp
Owner

I see what you mean. I have merged this. Thanks again for submitting the fix.

@videlalvaro

Thanks for merging this. I was in holidays so I couldn't reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 25, 2012
  1. @videlalvaro

    adds create_if_missing to remote file action

    videlalvaro authored
    at the moment the source recipe was downloading nodejs source all the time. With this change is just downloaded the first time
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  recipes/install_from_source.rb
View
1  recipes/install_from_source.rb
@@ -33,6 +33,7 @@
source node['nodejs']['src_url']
checksum node['nodejs']['checksum']
mode 0644
+ action :create_if_missing
end
# --no-same-owner required overcome "Cannot change ownership" bug
Something went wrong with that request. Please try again.