Skip to content

Commit 67a3dda

Browse files
author
Tristan Charbonneau
committed
fix(debian): don't rely on pillar.get, build repo.name when needed
1 parent b743fa9 commit 67a3dda

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

node/map.jinja

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
'source_hash': node.pkg.archive.uri ~ '/v' ~ node.version ~ '/SHASUMS256.txt',
3535
'source': '%s/v%s/%s.%s'|format(node.pkg.archive.uri, node.version, dirname, node.pkg.suffix)}) %}
3636
{%- endif %}
37+
{%- if node.pkg.use_upstream_repo -%}
38+
{%- set full_repo_name = 'deb %s/node_%s.x %s %s'|format(node.pkg.repo.url, node.pkg.version, node.pkg.repo.dist, node.pkg.repo.comps[0]) -%}
39+
{%- do node.pkg.repo.update({
40+
'name': full_repo_name}) -%}
41+
{%- endif -%}
3742

3843
## Legacy support (remove on/after Jan 2021) ##
3944

node/osfamilymap.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ Debian:
2828
{%- if 'oscodename' in grains %}
2929
repo:
3030
humanname: NodeSource Node.js Repository
31-
name: deb https://deb.nodesource.com/node_{{ salt['pillar.get']('node:pkg:version') }}.x {{ grains.oscodename }} main
31+
url: https://deb.nodesource.com
3232
dist: {{ grains['oscodename'] }}
33+
comps: ['main', ]
3334
file: /etc/apt/sources.list.d/nodesource.list
3435
key_url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
3536
keyserver: keyserver.ubuntu.com

0 commit comments

Comments
 (0)