changeset 174:b6b11048d0fb

collect nodejs pkg install stuff together
author drewp@bigasterisk.com
date Sat, 25 Mar 2023 18:40:59 -0700
parents c34198c2870e
children f2dc9ef37305
files package_lists.py packages.py
diffstat 2 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/package_lists.py	Sat Mar 25 18:39:53 2023 -0700
+++ b/package_lists.py	Sat Mar 25 18:40:59 2023 -0700
@@ -1,3 +1,5 @@
+# nodejs+friends are handled outside this file
+
 setup = [
     'atool',
     'build-essential',
@@ -17,10 +19,6 @@
     'dirmngr',
     'gnupg2',
 ]
-non_pi_setup = [
-    'nodejs',  # alt source, contains npm
-    # 'npm',
-]
 general = [
     'apt-listchanges',
     'aptitude',
--- a/packages.py	Sat Mar 25 18:39:53 2023 -0700
+++ b/packages.py	Sat Mar 25 18:40:59 2023 -0700
@@ -20,13 +20,15 @@
     files.link(target="{local}/bin/kitty", path="{home}/bin/kitty")
 
 
-def pnpm():
+def nodejs():
+    apt.packages(packages=['libnode72'], present=False, force=True)
+    apt.packages(packages=['nodejs'], latest=True)
     server.shell([
         "rm -f /usr/local/bin/pnp{m,x}",
         "corepack enable",
         # https://github.com/pnpm/pnpm/releases
         # but also https://pnpm.io/installation#compatibility
-        "corepack prepare 'pnpm@7.29.3' --activate",
+        "corepack prepare 'pnpm@7.30.1' --activate",
     ])
 
 
@@ -42,12 +44,10 @@
 
 kw = dict(latest=True)
 
-apt.packages(packages=['libnode72'], present=False, force=True)
 
 apt.packages(packages=package_lists.setup, **kw)
 
 if not is_pi:
-    apt.packages(packages=package_lists.non_pi_setup)
     if host.name != 'pipe':
         apt.packages(packages=['reptyr'])
     kitty()
@@ -79,4 +79,5 @@
 
 if not is_pi:
     apt.packages(packages=package_lists.non_pi, **kw)
-    pnpm()
\ No newline at end of file
+    if host.name != 'prime': # couldn't get prime to install a newer version than 18.7.0
+        nodejs()
\ No newline at end of file