saltstack/salt — pull request #12594 by nielsek (2014-05-07 11:14:12+00:00)
Title: use system locale for ports installation

I couldn't install the `sysutils/rubygem-bundler` port even though i changed my `LC_ALL` to `en_US.UTF-8`

===> Building for rubygem-bundler-1.5.3
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/rubygem-bundler
[ERROR ] stderr: ERROR: While executing gem ... (ArgumentError)
invalid byte sequence in US-ASCII
[INFO ] Executing command 'pkg info -ao' in directory '/root'
[ERROR ] Failed to install sysutils/rubygem-bundler. Error message:
ERROR: While executing gem ... (ArgumentError)
invalid byte sequence in US-ASCII
[INFO ] Completed state [sysutils/rubygem-bundler] at time 12:02:45.374921

Then i found out that salt was overwriting the locale, so after adding `reset_system_locale=False` it installed beautifully.

[INFO ] stdout: ===> Building for rubygem-bundler-1.5.3
Successfully built RubyGem
Name: bundler
Version: 1.5.3
File: bundler-1.5.3.gem
===> Staging for rubygem-bundler-1.5.3
===> rubygem-bundler-1.5.3 depends on file: /usr/local/bin/gem21 - found
===> rubygem-bundler-1.5.3 depends on file: /usr/local/bin/ruby21 - found
===> Generating temporary packing list
Successfully installed bundler-1.5.3
1 gem installed
Installing RDoc documentation for bundler-1.5.3...
====> Compressing man pages (compress-man)
===> Installing for rubygem-bundler-1.5.3
===> Checking if sysutils/rubygem-bundler already installed
===> Registering installation for rubygem-bundler-1.5.3
Installing rubygem-bundler-1.5.3... done
===> Cleaning for rubygem-bundler-1.5.3
[INFO ] Executing command 'pkg info -ao' in directory '/root'
[INFO ] Installed Packages:
rubygem-bundler changed from absent to 1.5.3