Skip to content

Commit

Permalink
fix(debian): don't rely on pillar.get, build repo.name when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan Charbonneau committed Aug 24, 2021
1 parent b743fa9 commit 67a3dda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions node/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
'source_hash': node.pkg.archive.uri ~ '/v' ~ node.version ~ '/SHASUMS256.txt',
'source': '%s/v%s/%s.%s'|format(node.pkg.archive.uri, node.version, dirname, node.pkg.suffix)}) %}
{%- endif %}
{%- if node.pkg.use_upstream_repo -%}
{%- 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]) -%}
{%- do node.pkg.repo.update({
'name': full_repo_name}) -%}
{%- endif -%}

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

Expand Down
3 changes: 2 additions & 1 deletion node/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ Debian:
{%- if 'oscodename' in grains %}
repo:
humanname: NodeSource Node.js Repository
name: deb https://deb.nodesource.com/node_{{ salt['pillar.get']('node:pkg:version') }}.x {{ grains.oscodename }} main
url: https://deb.nodesource.com
dist: {{ grains['oscodename'] }}
comps: ['main', ]
file: /etc/apt/sources.list.d/nodesource.list
key_url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
keyserver: keyserver.ubuntu.com
Expand Down

0 comments on commit 67a3dda

Please sign in to comment.