aki
null+****@clear*****
Thu May 16 13:34:50 JST 2013
aki 2013-05-16 13:34:50 +0900 (Thu, 16 May 2013) New Revision: 779417093e065c9d45c2f56b5c692a0aa0efd651 https://github.com/groonga/chef-cookbooks/commit/779417093e065c9d45c2f56b5c692a0aa0efd651 Merged 1425ea2: Merge pull request #1 from aki77/fix_repository Message: fix repository Modified files: groonga/recipes/repository.rb Modified: groonga/recipes/repository.rb (+16 -3) =================================================================== --- groonga/recipes/repository.rb 2013-03-01 14:45:38 +0900 (ab450ab) +++ groonga/recipes/repository.rb 2013-05-16 13:34:50 +0900 (e3008af) @@ -51,9 +51,22 @@ elsif platform_family?("rhel", "fedora") else family = "fedora" end - package "groonga-release" do - provider("rpm") + + remote_file "#{Chef::Config[:file_cache_path]}/groonga-release-1.1.0-1.noarch.rpm" do base_url = "http://packages.groonga.org/#{family}" - source("#{base_url}/groonga-release-1.1.0-1.noarch.rpm") + source "#{base_url}/groonga-release-1.1.0-1.noarch.rpm" + not_if "rpm -qa | egrep -qx 'groonga-release-1.1.0-1(|.noarch)'" + notifies :install, "rpm_package[groonga-release]", :immediately + end + + rpm_package "groonga-release" do + source "#{Chef::Config[:file_cache_path]}/groonga-release-1.1.0-1.noarch.rpm" + only_if {::File.exists?("#{Chef::Config[:file_cache_path]}/groonga-release-1.1.0-1.noarch.rpm")} + action :nothing + end + + file "groonga-release-cleanup" do + path "#{Chef::Config[:file_cache_path]}/groonga-release-1.1.0-1.noarch.rpm" + action :delete end end -------------- next part -------------- HTML����������������������������... Télécharger