Issue #234: Do not check utime on a copied symlink #240

Merged
merged 1 commit into from Jul 10, 2012

Projects

None yet

2 participants

@ctgswallow

/usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:121:in utime': No such file or directory - /tmp/package-dir-staging2 0120710-20351-f4vjw7/usr/lib/libQt3Support.so (Errno::ENOENT) from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:121:incopy_metadata'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:111:in copy' from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:79:inblock in clone'
from /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/find.rb:41:in block in find' from /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/find.rb:40:incatch'
from /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/find.rb:40:in find' from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:77:inclone'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:36:in block in input' from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:32:inchdir'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:32:in input' from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/command.rb:248:inblock in execute'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/command.rb:247:in each' from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/command.rb:247:inexecute'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/clamp-0.3.1/lib/clamp/command.rb:64:in run' from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/clamp-0.3.1/lib/clamp/command.rb:126:inrun'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/bin/fpm:8:in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p0/bin/fpm:19:inload'
from /usr/local/rvm/gems/ruby-1.9.3-p0/bin/fpm:19:in `

'

@ctgswallow ctgswallow Do not check utime on copied symlinks.
/usr/local
/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:121:in `utime': No such file or directory - /tmp/package-dir-staging2
0120710-20351-f4vjw7/usr/lib/libQt3Support.so (Errno::ENOENT)
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:121:in `copy_metadata'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:111:in `copy'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:79:in `block in clone'
	from /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/find.rb:41:in `block in find'
	from /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/find.rb:40:in `catch'
	from /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/find.rb:40:in `find'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:77:in `clone'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:36:in `block in input'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:32:in `chdir'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/package/dir.rb:32:in `input'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/command.rb:248:in `block in execute'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/command.rb:247:in `each'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/lib/fpm/command.rb:247:in `execute'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/clamp-0.3.1/lib/clamp/command.rb:64:in `run'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/clamp-0.3.1/lib/clamp/command.rb:126:in `run'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/fpm-0.4.10/bin/fpm:8:in `<top (required)>'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/bin/fpm:19:in `load'
	from /usr/local/rvm/gems/ruby-1.9.3-p0/bin/fpm:19:in `<main>'
1e5357c
@jordansissel jordansissel merged commit 5349374 into jordansissel:master Jul 10, 2012
@jordansissel
Owner

Thanks for htis patch!

As an FYI, I made a slight change post-merge:

-    return if source_stat.ino == dest_stat.ino || File.symlink?(destination)
+    return if source_stat.ino == dest_stat.ino || dest_stat.symlink?

Saves a stat call since we already know if 'destination' is a symlink through dest_stat (I think)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment