nodesource / nodesource/distributions
Debian packages missing nodejs alternative
@JesusPaz is already working on this.
Since Feb 9, 2022.
- Dominant language
- Shell
- Stars
- 13.8k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
Previous versions of the Debian nodejs packages contained a postinst script which called update-alternatives to set up /usr/bin/nodejs, but recent versions no longer do this. As a result, scripts that depended on /usr/bin/nodejs being present no longer function on newly built machines, while they do still work on machines that upgraded nodejs package from a version with that script.
I've spot checked a few:
- nodejs_12.18.1-1nodesource1_amd64.deb does call
update-alternatives - nodejs_12.22.6-1nodesource1_amd64.deb does not
- nodejs_14.5.0-1nodesource1_amd64.deb does call
update-alternatives - nodejs_14.17.6-deb-1nodesource1_amd64.deb does not
(I checked by downloading the .deb file, running ar x ${file} to extract it, extracting the control file with tar -xf control.tar.*, and examining postinst if present.)
This is closely related to #1095, which is asking about Ubuntu packages, but I'm not sure if packages for Debian are distinct.
As a workaround, users can manually run the command that used to be in postinst:
update-alternatives --quiet --install /usr/bin/nodejs nodejs \
/usr/bin/node 50 \
--slave /usr/share/man/man1/nodejs.1.gz nodejs.1.gz \
/usr/share/man/man1/node.1.gz
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.