Mobrovac has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316416

Change subject: NPM: pin nodejs to always be installed from the nodesource 
repository
......................................................................

NPM: pin nodejs to always be installed from the nodesource repository

The Wikimedia APT repo is pinned to > 1000, which means that APT will
try to downgrade a package when its version is newer than the installed
one. We don't want to do that for nodejs, so pin it to the nodesource
repository, which will always give us the newest node 4.x.

Bug: T148348
Change-Id: Ib2208d47b48c06b7a846e763390eac9d09674d2a
---
M puppet/modules/npm/manifests/init.pp
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/16/316416/1

diff --git a/puppet/modules/npm/manifests/init.pp 
b/puppet/modules/npm/manifests/init.pp
index 7f47e6d..81cc54c 100644
--- a/puppet/modules/npm/manifests/init.pp
+++ b/puppet/modules/npm/manifests/init.pp
@@ -40,7 +40,14 @@
         owner   => 'root',
         group   => 'root',
         require => Exec['ins-apt-transport-https'],
-        notify  => Exec['apt-get update'],
+        before  => Apt::Pin['nodejs'],
+    }
+
+    # pin it higher than the Wikimedia repo
+    apt::pin { 'nodejs':
+        package  => 'nodejs',
+        pin      => 'release o=Node Source',
+        priority => 1010,
     }
 
     # install the npm and nodejs-legacy packages manually
@@ -56,7 +63,7 @@
     package { 'nodejs':
         ensure  => latest,
         require => [
-            File['/etc/apt/sources.list.d/nodesource.list'],
+            Apt::Pin['nodejs'],
             Exec['apt-get update']
         ],
     }

-- 
To view, visit https://gerrit.wikimedia.org/r/316416
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2208d47b48c06b7a846e763390eac9d09674d2a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mobrovac <mobro...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to