some fixes
This commit is contained in:
parent
86e456c065
commit
73e76766f1
@ -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') {
|
||||||
|
@ -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
|
||||||
|
|
||||||
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user