some fixes

This commit is contained in:
John Bintz 2012-06-13 22:01:05 -04:00
parent 86e456c065
commit 73e76766f1
2 changed files with 6 additions and 4 deletions

View File

@ -6,7 +6,8 @@ class ruby($version, $configure = "--disable-install-doc", $build_path = '') {
version => $version, version => $version,
source => "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-<%= version %>.tar.gz", source => "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-<%= version %>.tar.gz",
configure => $configure, configure => $configure,
path => "${base::path}:${path}:${build_path}" preconfigure => "LDFLAGS='-rdynamic -Wl,-export-dynamic'",
path => "${build_path}:${with_ruby_path}"
} }
if ($osfamily == 'debian') { if ($osfamily == 'debian') {

View File

@ -2,7 +2,8 @@ Puppet::Type.type(:configure).provide(:action) do
desc "Configure a program to install" desc "Configure a program to install"
def create def create
system %{bash -c '#{path} cd #{@resource[:build_path]} ; #{@resource[:preconfigure]} ./configure --prefix=#{@resource[:install_path]} #{@resource[:options]}'}.tap { |o| p o } system %{bash -c "cd #{@resource[:build_path]} && #{@resource[:preconfigure].gsub('"', '\\"')} #{path} ./configure --prefix=#{@resource[:install_path]} #{@resource[:options]}"}.tap { |o| p o }
p $?
raise StandardError.new("Could not configure") if $?.exitstatus != 0 raise StandardError.new("Could not configure") if $?.exitstatus != 0
end end
@ -15,7 +16,7 @@ Puppet::Type.type(:configure).provide(:action) do
File.file?(config_status) File.file?(config_status)
end end
private private
def config_status def config_status
File.join(@resource[:build_path], @resource[:config_status]) File.join(@resource[:build_path], @resource[:config_status])
@ -30,7 +31,7 @@ Puppet::Type.type(:configure).provide(:action) do
end end
def path def path
@resource[:path].empty? ? '' : "export PATH=#{@resource[:path]}:$PATH ; " @resource[:path].empty? ? '' : "PATH=#{@resource[:path]}:$PATH "
end end
end end