Created
January 18, 2011 17:49
-
-
Save gondoi/784827 to your computer and use it in GitHub Desktop.
monkey patch for apt lock files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chef/provider/package/apt' | |
class Chef | |
class Provider | |
class Package | |
class Apt | |
class Safe < Chef::Provider::Package::Apt | |
def install_package(name, version) | |
Rackspace::Locks.wait_on_lock(new_resource.timeout) | |
run_command_with_systems_locale( | |
:command => "apt-get -q -y#{expand_options(@new_resource.options)} install #{name}=#{version}", | |
:environment => { | |
"DEBIAN_FRONTEND" => "noninteractive" | |
} | |
) | |
end | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment