[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, upstream, updated. 51bcebe38cab6088c901f1006339bbe40a36d161

James Turnbull james at lovedthanlost.net
Wed Aug 18 05:55:51 UTC 2010


The following commit has been merged in the upstream branch:
commit d4b8401dc4b2323a0c162e59e3f98b355d2c3c40
Author: James Turnbull <james at lovedthanlost.net>
Date:   Sat Jun 12 04:54:04 2010 +1000

    Merged Jos Backus patch to remove requirement for ftools altogether

diff --git a/install.rb b/install.rb
index d1b3f18..a40e292 100755
--- a/install.rb
+++ b/install.rb
@@ -35,13 +35,6 @@
 require 'rbconfig'
 require 'find'
 require 'fileutils'
-begin
-  require 'ftools' # apparently on some system ftools doesn't get loaded
-  $haveftools = true
-rescue LoadError
-  puts "ftools not found.  Using FileUtils instead.."
-  $haveftools = false
-end
 require 'optparse'
 require 'ostruct'
 
@@ -97,15 +90,9 @@ def do_libs(libs, strip = 'lib/')
     libs.each do |lf|
         olf = File.join(InstallOptions.site_dir, lf.gsub(/#{strip}/, ''))
         op = File.dirname(olf)
-        if $haveftools
-          File.makedirs(op, true)
-          File.chmod(0755, op)
-          File.install(lf, olf, 0644, true)
-        else
-          FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
-          FileUtils.chmod(0755, op)
-          FileUtils.install(lf, olf, {:mode => 0644, :verbose => true})
-        end
+        FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
+        FileUtils.chmod(0755, op)
+        FileUtils.install(lf, olf, {:mode => 0644, :verbose => true})
     end
 end
 
@@ -113,9 +100,9 @@ def do_man(man, strip = 'man/')
     man.each do |mf|
         omf = File.join(InstallOptions.man_dir, mf.gsub(/#{strip}/, ''))
         om = File.dirname(omf)
-        File.makedirs(om, true)
-        File.chmod(0644, om)
-        File.install(mf, omf, 0644, true)
+        FileUtils.makedirs(om, {:mode => 0755, :verbose => true})
+        FileUtils.chmod(0755, om)
+        FileUtils.install(mf, omf, {:mode => 0644, :verbose => true})
         gzip = %x{which gzip}
         gzip.chomp!
         %x{#{gzip} -f #{omf}}

-- 
Packaging of Facter for debian



More information about the Pkg-puppet-devel mailing list