Skip to content

Commit

Permalink
Ensure that the enclosing apt.conf.d dir exists
Browse files Browse the repository at this point in the history
Closes #129
  • Loading branch information
Thom May committed Mar 23, 2015
1 parent d9da784 commit ff517b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
end

# Updates 'apt-get update' timestamp after each update success
directory '/etc/apt/apt.conf.d' do
recursive true
end

cookbook_file '/etc/apt/apt.conf.d/15update-stamp' do
source '15update-stamp'
end
Expand Down
2 changes: 1 addition & 1 deletion resources/preference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def initialize(*args)
:pin,
:pin_priority

attribute :package_name, :kind_of => String, :name_attribute => true, :regex => [ /^([a-z]|[A-Z]|[0-9]|_|-|\.)+$/ ]
attribute :package_name, :kind_of => String, :name_attribute => true, :regex => [/^([a-z]|[A-Z]|[0-9]|_|-|\.)+$/]
attribute :glob, :kind_of => String
attribute :pin, :kind_of => String
attribute :pin_priority, :kind_of => String
2 changes: 1 addition & 1 deletion resources/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def initialize(*args)
:uri

# name of the repo, used for source.list filename
attribute :repo_name, :kind_of => String, :name_attribute => true, :regex => [ /^([a-z]|[A-Z]|[0-9]|_|-|\.)+$/ ]
attribute :repo_name, :kind_of => String, :name_attribute => true, :regex => [/^([a-z]|[A-Z]|[0-9]|_|-|\.)+$/]
attribute :uri, :kind_of => String
attribute :distribution, :kind_of => String
attribute :components, :kind_of => Array, :default => []
Expand Down

0 comments on commit ff517b0

Please sign in to comment.