[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Matt Robinson matt at puppetlabs.com
Tue May 10 08:06:47 UTC 2011


The following commit has been merged in the experimental branch:
commit 517fd2f3d354fb2c411d872187de12a92c992456
Author: James Turnbull <james at lovedthanlost.net>
Date:   Thu Mar 3 09:25:01 2011 +1100

    Fixed #6566 Replace ftools with filetuils in rake gem task
    
    ftools is used in the rake gem rasks. It is deprecated in
    Ruby 1.9.x and so we've replaced it with FileUtils.

diff --git a/tasks/rake/gem.rake b/tasks/rake/gem.rake
index d654886..efea738 100644
--- a/tasks/rake/gem.rake
+++ b/tasks/rake/gem.rake
@@ -1,4 +1,4 @@
-require 'ftools'
+require 'fileutils'
 
 GEM_FILES = FileList[
     '[A-Z]*',
@@ -44,7 +44,7 @@ end
 desc "Prepare binaries for gem creation"
 task :prepare_gem do
     SBIN.each do |f|
-      File.copy(f,"bin")
+      FileUtils.copy(f,"bin")
     end
 end
 
@@ -52,8 +52,9 @@ desc "Create the gem"
 task :create_gem => :prepare_gem do
     Dir.mkdir("pkg") rescue nil
     Gem::Builder.new(spec).build
-    File.move("puppet-#{Puppet::PUPPETVERSION}.gem", "pkg")
+    FileUtils.move("puppet-#{Puppet::PUPPETVERSION}.gem", "pkg")
     SBIN.each do |f|
-       File.unlink("bin/" + f.gsub(/sbin\//, ''))
+       fn = f.gsub(/sbin\/(.*)/, '\1')
+       FileUtils.rm_r "bin/" + fn
     end
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list