Permalink
Browse files

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>'
  • Loading branch information...
1 parent e93535b commit 1e5357c5bdf70e5ead3f266afb49212fe06cfda3 @ctgswallow committed Jul 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/fpm/package/dir.rb
View
3 lib/fpm/package/dir.rb
@@ -125,7 +125,8 @@ def copy_metadata(source, destination)
dest_stat = File::lstat(destination)
# If this is a hard-link, there's no metadata to copy.
- return if source_stat.ino == dest_stat.ino
+ # If this is a symlink, what it points to hasn't been copied yet.
+ return if source_stat.ino == dest_stat.ino || File.symlink?(destination)
File.utime(source_stat.atime, source_stat.mtime, destination)
begin

0 comments on commit 1e5357c

Please sign in to comment.