svn commit: r451907 - in head/devel/leatherman: . files

Romain Tartière romain at FreeBSD.org
Thu Oct 12 16:53:02 UTC 2017


Author: romain
Date: Thu Oct 12 16:53:01 2017
New Revision: 451907
URL: https://svnweb.freebsd.org/changeset/ports/451907

Log:
  Woraround crash when LC_* is not set
  
  Puppet and MCollective define LC_ALL=C.UTF-8 to avoid this crash, but it's
  still a problem for many use cases (e.g. cron job storing facts for
  MCollective).
  
  While this does not fix the root cause of the crash that is still under
  investigation, this makes facter usable regardless of the user's envrionment.
  
  PR:		222125
  Submitted by:	ryanb at honeycomb.net

Added:
  head/devel/leatherman/files/patch-locale_src_locale.cc   (contents, props changed)
Modified:
  head/devel/leatherman/Makefile

Modified: head/devel/leatherman/Makefile
==============================================================================
--- head/devel/leatherman/Makefile	Thu Oct 12 16:31:21 2017	(r451906)
+++ head/devel/leatherman/Makefile	Thu Oct 12 16:53:01 2017	(r451907)
@@ -2,7 +2,7 @@
 
 PORTNAME=	leatherman
 PORTVERSION=	1.3.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel
 
 MAINTAINER=	puppet at FreeBSD.org

Added: head/devel/leatherman/files/patch-locale_src_locale.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/leatherman/files/patch-locale_src_locale.cc	Thu Oct 12 16:53:01 2017	(r451907)
@@ -0,0 +1,12 @@
+--- locale/src/locale.cc.orig	2017-10-10 10:16:35 UTC
++++ locale/src/locale.cc
+@@ -43,6 +43,9 @@ namespace leatherman { namespace locale 
+             gen.add_messages_domain(domain);
+         }
+ 
++        if (id.empty())
++            return g_locales.insert(make_pair(domain, std::locale())).first->second;
++
+         // Ensure creating and adding a new locale is thread-safe.
+         try {
+             return g_locales.insert(make_pair(domain, gen(id))).first->second;


More information about the svn-ports-all mailing list