Issue #4695 has been updated by Dmitriy Sergeev.

Also hit this while to trying install postgresql on Debian. The idea of 
recreating cluster seemed too scary, so I came up with this Exec for 
installation:
    exec { "install_${postgresql_package}":
      command => "bash -c \'LANG=en_US.UTF-8 aptitude -y install 
${postgresql_package}'",
      unless  => 'dpkg -l ${postgresql_package} | grep ^ii',
    }

----------------------------------------
Bug #4695: Puppet should not reset locale
https://projects.puppetlabs.com/issues/4695#change-89332

* Author: Mo Morsi
* Status: Investigating
* Priority: High
* Assignee: Erik Dalén
* Category: exec
* Target version: 
* Affected Puppet version: 3.1.0
* Keywords: telly_deprecation locale
* Branch: https://github.com/puppetlabs/puppet/pull/1239
----------------------------------------
Puppet resets various locale related ENV variables to the posix default of 'C' 
immediately before invoked Kernel.exec to launch an executable (occurs when 
running a Single_exec in a recipe)

http://github.com/reductivelabs/puppet/blob/master/lib/puppet/util.rb#L295

The problem is, the python interpreter will attempt to parse these variables to 
determine the default locale, and if it is set to 'C' (or not set at all as it 
will default to 'C'), 'None' will be returned, ignoring the true default locale.

Thus any python script launched via Single_exec from a puppet recipe will not 
be able to get the default locale by invoking locale.getdefaultlocale(). This 
functionality is part of the standard python library and is relied upon by many 
various Python scripts.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to