Closed fnoop closed 6 years ago
legacy_debian_symlinks => false resolves the behaviour, this parameter should be aware of which versions/packages provide node or nodejs. Once the circular symlinks are in place the nodejs package cannot be removed (fails preremove checks).
@fnoop Quality bug report. Can you confirm that you didn't have the nodejs-legacy package installed?
This module then overwrites this with a symlink.
Whoops.
Nor is this behaviour idempotent - the first run it installs the link before the package so the package overwrites the link, then on subsequent run it overwrites the file with the link.
Even better.
this parameter should be aware of which versions/packages provide node or nodejs
This could be a bit tricky. An easier solution might be to run a hackey exec to check the existence and type of file of /usr/bin/node and go from there.
Once the circular symlinks are in place the nodejs package cannot be removed (fails preremove checks).
Super.
The best way to fix this is probably using puppet-alternatives.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
Circular symlinks and nodejs not working:
What behaviour did you expect instead
Output log
Any additional information you'd like to impart
The nodejs package installed from the repo that this module manages installs node as /usr/bin/node:
This module then overwrites this with a symlink. Nor is this behaviour idempotent - the first run it installs the link before the package so the package overwrites the link, then on subsequent run it overwrites the file with the link.