Skip to content
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

Merged
merged 3 commits into from
Nov 17, 2020

Conversation

kenyon
Copy link
Member

@kenyon kenyon commented Nov 1, 2020

  • 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.

kenyon added a commit to kenyon/puppet that referenced this pull request Nov 1, 2020
@bastelfreak bastelfreak added the enhancement New feature or request label Nov 2, 2020
@@ -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',
Copy link
Member

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?

Copy link
Member Author

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,
Copy link
Member

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?

Copy link
Member Author

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.
@kenyon kenyon merged commit a311c5d into voxpupuli:master Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants