Update apt cookbook
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apt
|
||||
# Cookbook:: apt
|
||||
# Library:: helpers
|
||||
#
|
||||
# Copyright 2013 Chef Software, Inc.
|
||||
# Copyright:: 2013-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -27,18 +27,6 @@ module Apt
|
||||
!which('apt-get').nil?
|
||||
end
|
||||
|
||||
# Determines whether we need to run `apt-get update`
|
||||
#
|
||||
# @return [Boolean]
|
||||
def apt_up_to_date?
|
||||
if ::File.exist?('/var/lib/apt/periodic/update-success-stamp') &&
|
||||
::File.mtime('/var/lib/apt/periodic/update-success-stamp') > Time.now - node['apt']['periodic_update_min_delay']
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
# Finds a command in $PATH
|
||||
#
|
||||
# @return [String, nil]
|
||||
|
||||
Reference in New Issue
Block a user