Please review pull request #211: (#14521) Fix install for vendored cfpropertylist code opened by (hkenney)

Description:

In Facter 2.0 we're vendoring some code for cfpropertylist and install.rb mangled the path and did not include the license. This resolves both those issues.

  • Opened: Wed May 16 20:27:39 UTC 2012
  • Based on: puppetlabs:2.0rc (1368bd6558659a9742d067d03a95fccb9f6717fe)
  • Requested merge: hkenney:ticket/master/14521_install_strips_all_lib_dirs (0fa58fcaa5c645265b629916be889143081258f8)

Diff follows:

diff --git a/install.rb b/install.rb
index 485a0df..7fd442f 100755
--- a/install.rb
+++ b/install.rb
@@ -87,7 +87,7 @@ def glob(list)
 rdoc  = glob(%w{bin/* sbin/* lib/**/*.rb README README-library CHANGELOG TODO Install}).reject { |e| e=~ /\.(bat|cmd)$/ }
 ri  = glob(%w(bin/*.rb sbin/* lib/**/*.rb)).reject { |e| e=~ /\.(bat|cmd)$/ }
 man   = glob(%w{man/man8/*})
-libs  = glob(%w{lib/**/*.rb lib/**/*.py})
+libs  = glob(%w{lib/**/*.rb lib/**/*.py lib/**/LICENSE})
 tests = glob(%w{tests/**/*.rb})
 
 def do_bins(bins, target, strip = 's?bin/')
@@ -99,7 +99,7 @@ def do_bins(bins, target, strip = 's?bin/')
 
 def do_libs(libs, strip = 'lib/')
   libs.each do |lf|
-    olf = File.join(InstallOptions.site_dir, lf.gsub(/#{strip}/, ''))
+    olf = File.join(InstallOptions.site_dir, lf.gsub(/^#{strip}/, ''))
     op = File.dirname(olf)
     FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
     FileUtils.chmod(0755, op)

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to