Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (68b473756ee10d16b87f79d562d9a95e7114f2d3)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Justin Boffemmyer <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (68b473756ee10d16b87f79d562d9a95e7114f2d3)
  • Date: Thu, 23 Jun 2011 19:55:38 -0500

GIT changes to master cauldron by Justin Boffemmyer <flux AT sourcemage.org>:

cauldron/lib/libcauldron | 12 ++++++++----
enchantment/lib/libenchantment | 7 ++++++-
2 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 68b473756ee10d16b87f79d562d9a95e7114f2d3
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

force "C" collating

Different locale settings can interfere with, for example, sorting or
grepping. Enforce sane locale settings for our purposes. This should not
affect end-user output from the scripts. If there is a problem in the
end-user output, then the scripts can be modified to first save the
locale settings and then restore them before final output.

commit 50d975ae460c742945df176977c9ce31d26844f2
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

don't hardcode /dev/null

Allow the _NULL variables (CAULDRON and ENCHANT) to point to paths other
than /dev/null, and only set the value to /dev/null if the _NULL
variables aren't already defined. This allows for overriding the
throwing away of what is normally considered unncessary output, so that
it can, for example, be collected in a debug log file. Also, ensure the
variables are properly quoted, as arbitrary paths may contain things
like spaces.

diff --git a/cauldron/lib/libcauldron b/cauldron/lib/libcauldron
index 4257638..9011b0f 100755
--- a/cauldron/lib/libcauldron
+++ b/cauldron/lib/libcauldron
@@ -15,8 +15,12 @@
##

#-------------------------------------------------------------------------------

+# set LC_COLLATE to C so we don't get affected by the user's locale
+# when grepping, sorting, etc.
+export LC_COLLATE="C"
+
# shorthand and non-hardcoded /dev/null for output dumping
-CAULDRON_NULL="/dev/null"
+CAULDRON_NULL="${CAULDRON_NULL:-/dev/null}"


#-------------------------------------------------------------------------------
##
@@ -34,14 +38,14 @@ function cauldron_fatal_error() {
## error handling library includes - load these first!
##

#-------------------------------------------------------------------------------
-. "$CAULDRON_COMMON/liberror" 2>$CAULDRON_NULL ||
+. "$CAULDRON_COMMON/liberror" 2>"$CAULDRON_NULL" ||
cauldron_fatal_error "error: cannot load base library liberror"

# load cauldron error code and message defines
-. "$CAULDRON_LIBS/errorcodes" 2>$CAULDRON_NULL ||
+. "$CAULDRON_LIBS/errorcodes" 2>"$CAULDRON_NULL" ||
cauldron_fatal_error "error: cannot load cauldron error codes"

-. "$CAULDRON_COMMON/libcolor" 2>$CAULDRON_NULL ||
+. "$CAULDRON_COMMON/libcolor" 2>"$CAULDRON_NULL" ||
cauldron_fatal_error "error: cannot load base library libcolor"

# test/set whether color output should be enabled
diff --git a/enchantment/lib/libenchantment b/enchantment/lib/libenchantment
index 48bcb8e..f6e6d5c 100755
--- a/enchantment/lib/libenchantment
+++ b/enchantment/lib/libenchantment
@@ -24,7 +24,12 @@
##

#-------------------------------------------------------------------------------

-ENCHANT_NULL="/dev/null"
+# set LC_COLLATE to C so we don't get affected by the user's locale
+# when grepping, sorting, etc.
+export LC_COLLATE="C"
+
+# shorthand and non-hardcoded /dev/null for output dumping
+ENCHANT_NULL="${ENCHANTMENT_NULL:-/dev/null}"


#-------------------------------------------------------------------------------
##



  • [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (68b473756ee10d16b87f79d562d9a95e7114f2d3), Justin Boffemmyer, 06/23/2011

Archive powered by MHonArc 2.6.24.

Top of Page