From d70724a34ca4d4f26e588ec5c300820bc1f2822d Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@gnu.org>
Date: Wed, 23 Apr 2014 11:57:14 +0900
Subject: [PATCH] autopoint: Unset variables known to interfere with common
tools
Reported by Jan Cholasta at:
<https://bugzilla.redhat.com/show_bug.cgi?id=801374>.
* autopoint.in: Unset CDPATH, CLICOLOR_FORCE, and GREP_OPTIONS.
* gettextize.in: Unset CLICOLOR_FORCE and GREP_OPTIONS.
---
gettext-tools/misc/autopoint.in | 7 +++++++
gettext-tools/misc/gettextize.in | 4 ++++
2 files changed, 11 insertions(+)
Index: gettext-0.18.3.2/gettext-tools/misc/autopoint.in
===================================================================
--- gettext-0.18.3.2.orig/gettext-tools/misc/autopoint.in
+++ gettext-0.18.3.2/gettext-tools/misc/autopoint.in
@@ -200,6 +200,13 @@ func_fatal_error ()
exit 1
}
+# Nuisances.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
# Command-line option processing.
# Removes the OPTIONS from the arguments. Sets the variables:
# - force yes if --force was given, empty otherwise
Index: gettext-0.18.3.2/gettext-tools/misc/gettextize.in
===================================================================
--- gettext-0.18.3.2.orig/gettext-tools/misc/gettextize.in
+++ gettext-0.18.3.2/gettext-tools/misc/gettextize.in
@@ -203,6 +203,10 @@ func_fatal_error ()
# Nuisances.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
# Command-line option processing.
# Removes the OPTIONS from the arguments. Sets the variables:
# - force 1 if --force was given, 0 otherwise