sprinkle-tool / sprinkle

Sprinkle is a software provisioning tool you can use to build remote servers with. eg. to install a Rails, or Sinatra stack on a brand new slice directly after its been created
https://github.com/sprinkle-tool/sprinkle
MIT License
1.15k stars 138 forks source link

fix client-side vs server-side bug in source installer #46

Closed sunaku closed 13 years ago

sunaku commented 13 years ago

See this comment thread for details.

crafterm commented 13 years ago

Thanks for the request. After looking at the initial code that included the File.exist check I've decided to revert that change rather than import the request. Looking at the intent, it seems wget already does what's being looked for? (if the file exists wget will either continue or skip it).

The other issue is that the source installer test fails - with the updated installation command checking the full source remote URL path in 'test -f' and 'cp' commands rather than a local one, which appears wrong.

  1) Sprinkle::Installers::Source during gnu source archive style installation should download the source archive to the correct path
     Failure/Error: ]
       expected: ["wget -cq -O '/usr/local/archives/ruby-1.8.6-p111.tar.gz' ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz"]
            got: ["test -f ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz && cp ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz /usr/local/archives/ruby-1.8.6-p111.tar.gz || wget -cq -O '/usr/local/archives/ruby-1.8.6-p111.tar.gz' ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz"] (using ==)

If there's something I've missed with this feature please let me know and we can discuss it further to get a good solution in place.

sunaku commented 13 years ago

Sounds good. Deleted code is debugged code. :cop: