-
-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debian and Ubuntu versioning and package name fixes #431
Conversation
While I wait for my features to be upstreamed: * voxpupuli/puppet-nodejs#431 * voxpupuli/puppet-nodejs#432
@@ -22,13 +22,21 @@ | |||
case $facts['os']['family'] { | |||
'Debian': { | |||
if $facts['os']['release']['major'] =~ /^(9|10)$/ { | |||
$debian_nodejs_dev_package_name = $facts['os']['release']['major'] ? { | |||
'9' => 'nodejs-dev', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add an accetpance test to verify the new settings are correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bastelfreak I added acceptance tests. I'm not sure if the "uninstall" step is the proper way to do this, but it works.
default => 'libnode-dev', | ||
} | ||
$debian_npm_package_name = $facts['os']['release']['major'] ? { | ||
'9' => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like mixing of strings and booleans, can this be done differently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juniorsysadmin I did it like that to preserve the existing value of false
for Debian 9. This is also seen in the OpenBSD and Gentoo cases in this file. I suppose we could make it undef
instead, but that would make it inconsistent with the OpenBSD and Gentoo cases. I could change those also, but that starts to get outside the scope of my pull request.
* Debian has a native nodejs dev package, so define that. * Debian 10 has a native npm package, so define that for Debian 10. * Improve native_debian_devel_package logic: support Debian 10 onward and Ubuntu 20.04 onward with the libnode-dev package name. * After the above changes, the variable is_supported_debian_version becomes obsolete, so most of the tests can work normally. The only special case is Debian 9 lacking the native npm package.
405debb
to
3ef1fa6
Compare
3ef1fa6
to
4a0de4d
Compare
Debian has a native nodejs dev package, so define that.
Debian 10 has a native npm package, so define that for Debian 10.
Improve
native_debian_devel_package
logic: support Debian 10 onward and Ubuntu 20.04 onward with the libnode-dev package name.After the above changes, the variable
is_supported_debian_version
becomes obsolete, so most of the tests can work normally. The only special case is Debian 9 lacking the native npm package.