I am using 2.0.6 version on Mac OS X 10.5.7 with Ruby 1.8.6 (2008-08-11 patchlevel 287) and import fails with:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fil eutils.rb:1055:in `read': Is a directory - /Users/mitar/Temp/wlanlj/branches/openwrt/.trunk.tmp/target/linux/ar7/files /arch/mips/include/asm/ar7 (Errno::EISDIR) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fil eutils.rb:1055:in `fu_copy_stream0' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fil eutils.rb:1263:in `copy_file' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fil eutils.rb:1262:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fil eutils.rb:1262:in `copy_file' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fil eutils.rb:1261:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fil eutils.rb:1261:in `copy_file' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fil eutils.rb:463:in `copy_file' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fil eutils.rb:383:in `cp' ... 13 levels... from /Users/mitar/Downloads/piston/lib/piston/cli.rb:121 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rub ygems/custom_require.rb:27:in `gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rub ygems/custom_require.rb:27:in `require' from /Users/mitar/Downloads/piston/bin/piston:5
Thanks for the update. I haven't verified yet locally, and I'm
swamped, and I'm going on vacation later this week. So I don't know
if I'll get back to this before the end of the month.
Anyway, thanks for verifying.
If you want to look, it appears the problem is caused by Piston
incorrectly thinking a folder is a file. Unfortunately, Ruby is very
helpful and cuts the backtrace right where we need it. Anyway, the
error should be somewhere in lib/piston/svn/working_copy.rb or lib/ piston/working_copy.rb
It seems the problem is that the source file was a symlink and FileUtils.cp went copying its target contents and it did not copy symlink as it is. I have changed FileUtils.cp to FileUtils.copy_entry in copy_to method and it seems it works. But probably you should check also other parts of the source code if symlinks break anything.
> It seems the problem is that the source file was a symlink and
> FileUtils.cp went copying its target contents and it did not copy
> symlink as it is. I have changed FileUtils.cp to FileUtils.copy_entry
> in copy_to method and it seems it works. But probably you should check
> also other parts of the source code if symlinks break anything.
> Thanks for the update. Could you write a test case, either Cucumber > or Test::Unit, and submit a pull request?
Uh, sorry, I have not yet used those tools and I do not have time currently to start learning them (and Ruby). I would like to put myself into a role of "just" user, if I may.