Add missing changes for mediawiki upgrades
This commit is contained in:
@@ -19,14 +19,14 @@
|
||||
#
|
||||
|
||||
property :package_name, String, name_property: true
|
||||
property :version, [String, nil], default: nil
|
||||
property :version, [String, nil]
|
||||
property :channel, String
|
||||
property :options, String
|
||||
property :directives, Hash, default: {}
|
||||
property :zend_extensions, Array, default: []
|
||||
property :preferred_state, String, default: 'stable'
|
||||
property :binary, String, default: 'pear'
|
||||
property :priority, [String, nil], default: nil
|
||||
property :priority, [String, nil]
|
||||
|
||||
def current_installed_version(new_resource)
|
||||
version_check_cmd = "#{new_resource.binary} -d"
|
||||
@@ -69,6 +69,8 @@ load_current_value do |new_resource|
|
||||
end
|
||||
|
||||
action :install do
|
||||
build_essential
|
||||
|
||||
# If we specified a version, and it's not the current version, move to the specified version
|
||||
install_version = new_resource.version unless new_resource.version.nil? || new_resource.version == current_resource.version
|
||||
# Check if the version we want is already installed
|
||||
@@ -87,6 +89,8 @@ end
|
||||
|
||||
# reinstall is just an install that always fires
|
||||
action :reinstall do
|
||||
build_essential
|
||||
|
||||
install_version = new_resource.version unless new_resource.version.nil?
|
||||
converge_by("reinstall package #{new_resource.package_name} #{install_version}") do
|
||||
info_output = "Installing #{new_resource.package_name}"
|
||||
@@ -214,7 +218,14 @@ action_class do
|
||||
def get_extension_files(name)
|
||||
files = []
|
||||
|
||||
p = shell_out("#{new_resource.binary} list-files #{name}")
|
||||
# use appropriate binary when listing pecl packages
|
||||
list_binary = if new_resource.channel == 'pecl.php.net'
|
||||
node['php']['pecl']
|
||||
else
|
||||
new_resource.binary
|
||||
end
|
||||
|
||||
p = shell_out("#{list_binary} list-files #{name}")
|
||||
p.stdout.each_line.grep(/^src\s+.*\.so$/i).each do |line|
|
||||
files << line.split[1]
|
||||
end
|
||||
@@ -231,7 +242,11 @@ action_class do
|
||||
search_args << " search#{expand_channel(new_resource.channel)} #{new_resource.package_name}"
|
||||
|
||||
if grep_for_version(shell_out(new_resource.binary + search_args).stdout, new_resource.package_name)
|
||||
false
|
||||
if (new_resource.binary.include? 'pecl') || (new_resource.channel == 'pecl.php.net')
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
elsif grep_for_version(shell_out(node['php']['pecl'] + search_args).stdout, new_resource.package_name)
|
||||
true
|
||||
else
|
||||
@@ -276,5 +291,10 @@ action_class do
|
||||
)
|
||||
action action
|
||||
end
|
||||
|
||||
execute "#{node['php']['enable_mod']} #{name}" do
|
||||
creates "#{node['php']['conf_dir']}/conf.d/#{name}"
|
||||
only_if { platform_family? 'debian' }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
property :channel_xml, String
|
||||
property :channel_name, String, name_property: true
|
||||
property :binary, String, default: 'pear'
|
||||
# TODO: add authenticated channel support!
|
||||
# property :username, :kind_of => String
|
||||
# property :password, :kind_of => String
|
||||
|
||||
action :discover do
|
||||
unless exists?
|
||||
|
||||
Reference in New Issue
Block a user