From ecebd86abb6d7feed29902efd7a86ef5205200c3 Mon Sep 17 00:00:00 2001 From: Si Wilkins Date: Wed, 8 May 2013 12:47:26 +0100 Subject: [PATCH 1/2] Fixed install failures on Ubuntu due to npm being packaged into node.js in Chris lea's PPA --- manifests/init.pp | 10 ++++++---- spec/classes/nodejs_spec.rb | 10 ++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index d72c521d..29358e91 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -69,10 +69,12 @@ require => Anchor['nodejs::repo'] } - package { 'npm': - name => $nodejs::params::npm_pkg, - ensure => present, - require => Anchor['nodejs::repo'] + if $::operatingsystem != 'ubuntu' or $::lsbdistcodename == 'Precise' { + package { 'npm': + name => $nodejs::params::npm_pkg, + ensure => present, + require => Anchor['nodejs::repo'] + } } if $proxy { diff --git a/spec/classes/nodejs_spec.rb b/spec/classes/nodejs_spec.rb index 9c6e7357..6ea35125 100644 --- a/spec/classes/nodejs_spec.rb +++ b/spec/classes/nodejs_spec.rb @@ -45,10 +45,7 @@ 'require' => 'Anchor[nodejs::repo]', }) } it { should contain_package('nodejs-dev') } - it { should contain_package('npm').with({ - 'name' => 'npm', - 'require' => 'Anchor[nodejs::repo]', - }) } + it { should_not contain_package('npm') } it { should_not contain_package('nodejs-stable-release') } end @@ -98,10 +95,7 @@ { :proxy => 'http://proxy.puppetlabs.lan:80/' } end - it { should contain_package('npm').with({ - 'name' => 'npm', - 'require' => 'Anchor[nodejs::repo]', - }) } + it { should_not contain_package('npm') } it { should contain_exec('npm_proxy').with({ 'command' => 'npm config set proxy http://proxy.puppetlabs.lan:80/', 'require' => 'Package[npm]', From 6e90725aa535363f1aa4582376f207218c4d91d2 Mon Sep 17 00:00:00 2001 From: 25th-floor Operations Date: Sun, 19 May 2013 16:41:42 +0200 Subject: [PATCH 2/2] added PPA ppa:chris-lea/node.js-devel for nodejs-dev on Ubuntu --- manifests/init.pp | 4 ++++ spec/classes/nodejs_spec.rb | 1 + 2 files changed, 5 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 29358e91..b68c067f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -36,6 +36,10 @@ apt::ppa { 'ppa:chris-lea/node.js': before => Anchor['nodejs::repo'], } + + apt::ppa { 'ppa:chris-lea/node.js-devel': + before => Anchor['nodejs::repo'], + } } } diff --git a/spec/classes/nodejs_spec.rb b/spec/classes/nodejs_spec.rb index 6ea35125..52dbfde2 100644 --- a/spec/classes/nodejs_spec.rb +++ b/spec/classes/nodejs_spec.rb @@ -39,6 +39,7 @@ it { should contain_class('apt') } it { should contain_apt__ppa('ppa:chris-lea/node.js') } + it { should contain_apt__ppa('ppa:chris-lea/node.js-devel') } it { should contain_package('nodejs') } it { should contain_package('nodejs').with({ 'name' => 'nodejs',