[Rake-devel] windows xp package task

Dominic Sisneros dsisnero at gmail.com
Thu Nov 9 17:12:21 EST 2006


On windows, I use the GnuWin32 tar package.  When I try to use the package
task it gave me an error that windows cannot fork.  Looking online, I find
this blog post
http://blog.labnotes.org/2005/11/03/creating-zip-and-tar-packages-with-rake-on-windows/which
has the following

Creating a zip package worked on the first try, but tar complained
that it *'Cannot
fork: Function not implemented' *. It turns out that Cygwin's tar can't run
gzip. So once again, it's time to fix the Rake source code. This time we're
talking about *rake/packagetask.rb*, line 117 that calls tar with the z
option. I replaced that one line with a separate call to tar and gzip:

 sh %{tar cvf #{package_name}.tar #{package_name}} if flag == 'z'   sh
%{gzip #{package_name}.tar} end

 You'll need to be a bit more fancy if you want to support both .tar.gz and
.tgz suffixes, but this little fix will allow you to create .tar.gz.

I did this and the package task worked.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rake-devel/attachments/20061109/dd04217a/attachment.html 


More information about the Rake-devel mailing list