Skip to content
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.

Commit

Permalink
COOK-136, resolve merge conflict on removing only_if
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Oct 13, 2011
1 parent 00539db commit 4e0dadb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions apt/providers/repository.rb
Expand Up @@ -55,6 +55,7 @@
end.run_action(:create)
execute "update package index" do
command "apt-get update"
ignore_failure true
action :nothing
end.run_action(:run)
new_resource.updated_by_last_action(true)
Expand Down
5 changes: 4 additions & 1 deletion apt/recipes/default.rb
Expand Up @@ -21,7 +21,9 @@
# Run apt-get update to create the stamp file
execute "apt-get-update" do
command "apt-get update"
not_if do File.exists?('/var/lib/apt/periodic/update-success-stamp') end
ignore_failure true
not_if do ::File.exists?('/var/lib/apt/periodic/update-success-stamp') end
action :nothing
end

# provides /var/lib/apt/periodic/update-success-stamp on apt-get update
Expand All @@ -31,6 +33,7 @@

execute "apt-get-update-periodic" do
command "apt-get update"
ignore_failure true
only_if do
File.exists?('/var/lib/apt/periodic/update-success-stamp') &&
File.mtime('/var/lib/apt/periodic/update-success-stamp') < Time.now - 86400
Expand Down

0 comments on commit 4e0dadb

Please sign in to comment.