这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@JeffAbrahamson
Copy link
Contributor

From ubuntu 15.10 to ubuntu 16.04, the locale config file location
changed. It used to live at /var/lib/locales/supported.d/local but
moved to /etc/locale.gen .

This code should manifestly be modified (soon) to understand that we
really want "version 16.04 or later". That, oddly, exceeds my
puppet-fu. Suggestions most welcome.

From ubuntu 15.10 to ubuntu 16.04, the locale config file location
changed.  It used to live at /var/lib/locales/supported.d/local but
moved to /etc/locale.gen .

This code should manifestly be modified (soon) to understand that we
really want "version 16.04 or later".  That, oddly, exceeds my
puppet-fu.  Suggestions most welcome.
@mvisonneau
Copy link

👍

$update_locale_pkg = 'libc-bin'
}
}
case $::operatingsystemrelease {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use versioncmp to check for the OS version. Versioncmp() outputs 0 if the version is equal and 1 for newer, so versioncmp($::operatingsystemrelease, '16.04') >= 0 should give you Ubuntu Xenial and newer and futureproof this.

A usage example: https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/version.pp#L24

@Yggdrasil
Copy link

@JeffAbrahamson Good work. Definitely has my vote, but I've added a suggestion to the PR to make this PR work for 16.10 and future versions too by using versioncmp(). Perhaps you could add this, please?

@JeffAbrahamson
Copy link
Contributor Author

Thanks for the suggestion (and improvement to my puppet skills). Done and pushed.

I think I should really squash those two commits together, but I'm not sure which trumps: that this is my branch on my fork of the repo or that it's now a PR that many can see. So I've simply pushed a squashed branch as well: ubuntu-16.04-squashed to cover my bases. (I'm happy to squash this one as well if that's preferable.)

@saz saz merged commit 896b954 into saz:master Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants