Skip to content

Commit bcda543

Browse files
committed
remove rpm install as those packages are no longer available; print a message if there are no packages; currently supported are ubuntu and smartos
1 parent 452edb6 commit bcda543

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

recipes/install_from_package.rb

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#
22
# Author:: Nathan L Smith ([email protected])
3+
# Author:: Marius Ducea ([email protected])
34
# Cookbook Name:: nodejs
45
# Recipe:: package
56
#
67
# Copyright 2012, Cramer Development, Inc.
8+
# Copyright 2013, Opscale
79
#
810
# Licensed under the Apache License, Version 2.0 (the "License");
911
# you may not use this file except in compliance with the License.
@@ -19,22 +21,6 @@
1921
#
2022

2123
case node['platform_family']
22-
when 'rhel', 'fedora'
23-
file = '/usr/local/src/nodejs-stable-release.noarch.rpm'
24-
25-
remote_file file do
26-
source 'http://nodejs.tchol.org/repocfg/el/nodejs-stable-release.noarch.rpm'
27-
action :create_if_missing
28-
end
29-
30-
yum_package 'nodejs-stable-release' do
31-
source file
32-
options '--nogpgcheck'
33-
end
34-
35-
%w{ nodejs nodejs-compat-symlinks npm }.each do |pkg|
36-
package pkg
37-
end
3824
when 'debian'
3925
apt_repository 'node.js' do
4026
uri 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu'
@@ -44,14 +30,14 @@
4430
key "C7917B12"
4531
action :add
4632
end
47-
48-
%w{ nodejs npm }.each do |pkg|
49-
package pkg
50-
end
33+
packages = %w{ nodejs npm }
5134
when 'smartos'
52-
%w{ nodejs }.each do |pkg|
53-
package pkg
54-
end
35+
packages = %w{ nodejs }
5536
else
56-
include_recipe "nodejs::install_from_source"
37+
Chef::Log.error "There are no nodejs packages for this platform; please use the source or binary method to install node"
38+
return
39+
end
40+
41+
packages.each do |node_pkg|
42+
package node_pkg
5743
end

0 commit comments

Comments
 (0)