jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: Ib2208d47b48c06b7a846e763390eac9d09674d2a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mobrovac <mobro...@wikimedia.org>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Dduvall <dduv...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to