Skip to content

Commit

Permalink
Prevent useless relinking when packaging
Browse files Browse the repository at this point in the history
Previously rake would relink everything in the package directory even
when no file had changed.  This occurred because rake was told the
package directory was a file so it would attempt to recreate it by
linking all the files.

Now Rake knows the package directory is a directory and will not attempt
to recreated it unless the package file list changes.

Fixes #276
  • Loading branch information
drbrain committed Nov 24, 2014
1 parent f63bf26 commit ffda9d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions History.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Bug fixes:
* Updated rake manpage. Pull request #291 by skittleys.
* Add Rake::LATE to allow rebuilding of files that depend on deleted files.
Bug #286, pull request #287 by David Grayson.
* Fix relinking of files when repackaging. Bug #276 by Muenze.

=== 10.3.3

Expand Down
5 changes: 1 addition & 4 deletions lib/rake/packagetask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ def define
end
end

directory package_dir

file package_dir_path => @package_files do
mkdir_p package_dir rescue nil
directory package_dir_path => @package_files do
@package_files.each do |fn|
f = File.join(package_dir_path, fn)
fdir = File.dirname(f)
Expand Down

0 comments on commit ffda9d6

Please sign in to comment.