Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Handle potentially missing attributes for (currently) un-supported platforms #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ default["postgresql"]["cfg_update_action"] = :restart
#----------------------------------------------------------------------------
# APT REPOSITORY
#----------------------------------------------------------------------------
default["postgresql"]["apt_distribution"] = node["lsb"]["codename"]
default["postgresql"]["apt_distribution"] = node["lsb"] && node["lsb"]["codename"]
default["postgresql"]["apt_repository"] = "apt.postgresql.org"
default["postgresql"]["apt_uri"] = "http://apt.postgresql.org/pub/repos/apt"
default["postgresql"]["apt_components"] = ["main"]
Expand Down
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# APT REPOSITORY
#------------------------------------------------------------------------------

default["postgresql"]["apt_distribution"] = node["lsb"]["codename"]
default["postgresql"]["apt_distribution"] = node["lsb"] && node["lsb"]["codename"]
default["postgresql"]["apt_repository"] = "apt.postgresql.org"
default["postgresql"]["apt_uri"] = "http://apt.postgresql.org/pub/repos/apt"
default["postgresql"]["apt_components"] = ["main", node["postgresql"]["version"]]
Expand Down
6 changes: 3 additions & 3 deletions recipes/debian_backports.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
#

# backports for initial support
backports_uri = if node["lsb"]["codename"] == "wheezy"
backports_uri = if node["lsb"] && node["lsb"]["codename"] == "wheezy"
"http://cdn.debian.net/debian"
else
"http://backports.debian.org/debian-backports"
end

apt_repository "debian-backports" do
uri backports_uri
distribution "#{node["lsb"]["codename"]}-backports"
distribution "#{node["lsb"] && node["lsb"]["codename"]}-backports"
components ["main"]
end

# backports support for debian
%w[libpq5 postgresql-common].each do |pkg|
package pkg do
options "-t #{node["lsb"]["codename"]}-backports"
options "-t #{node["lsb"] && node["lsb"]["codename"]}-backports"
end
end