Import fails

6 views
Skip to first unread message

Mitar

unread,
Aug 6, 2009, 8:41:34 PM8/6/09
to piston-d...@googlegroups.com
Hi!

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/fileutils.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/fileutils.rb:1055:in
`fu_copy_stream0'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1263:in
`copy_file'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1262:in
`open'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1262:in
`copy_file'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1261:in
`open'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1261:in
`copy_file'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:463:in
`copy_file'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.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/rubygems/custom_require.rb:27:in
`gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /Users/mitar/Downloads/piston/bin/piston:5

The command was:

piston import svn://svn.openwrt.org/openwrt/trunk/ trunk --repository-type=svn

What is wrong?


Mitar

François Beausoleil

unread,
Aug 7, 2009, 7:51:02 AM8/7/09
to piston-d...@googlegroups.com
Seems Piston is trying to copy a directory. Could you try with --
verbose 5 to give me more information?

Thanks!
--
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/

Mitar

unread,
Aug 7, 2009, 10:10:21 AM8/7/09
to piston-d...@googlegroups.com
Hi!

2009/8/7 François Beausoleil <francois....@gmail.com>:


> Seems Piston is trying to copy a directory.  Could you try with --
> verbose 5 to give me more information?

I have sent it to you.


Mitar

Mitar

unread,
Aug 11, 2009, 3:08:42 PM8/11/09
to piston-d...@googlegroups.com
Hi!

I have tested also on a Debian Linux system and it is the same. It
seems that it is the problem of the repository I am trying to import.


Mitar

François Beausoleil

unread,
Aug 11, 2009, 3:14:50 PM8/11/09
to piston-d...@googlegroups.com
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

Bye!

Mitar

unread,
Aug 16, 2009, 2:56:47 AM8/16/09
to piston-d...@googlegroups.com
Hi!

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.


Mitar

François Beausoleil

unread,
Aug 17, 2009, 1:20:07 PM8/17/09
to piston-d...@googlegroups.com
Hey, good catch!

Thanks for the update. Could you write a test case, either Cucumber
or Test::Unit, and submit a pull request?

Thanks!

Mitar

unread,
Aug 17, 2009, 4:53:23 PM8/17/09
to piston-d...@googlegroups.com
Hi!

> 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.


Mitar

Reply all
Reply to author
Forward
0 new messages