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,
source => "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-<%= version %>.tar.gz",
configure => $configure,
path => "${base::path}:${path}:${build_path}"
preconfigure => "LDFLAGS='-rdynamic -Wl,-export-dynamic'",
path => "${build_path}:${with_ruby_path}"
}
if ($osfamily == 'debian') {

View File

@ -2,7 +2,8 @@ Puppet::Type.type(:configure).provide(:action) do
desc "Configure a program to install"
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
end
@ -30,7 +31,7 @@ Puppet::Type.type(:configure).provide(:action) do
end
def path
@resource[:path].empty? ? '' : "export PATH=#{@resource[:path]}:$PATH ; "
@resource[:path].empty? ? '' : "PATH=#{@resource[:path]}:$PATH "
end
end