~sourcemage/sorcery

496fc22b0037ffd654cd06ecbbae5d79ee8cdd44 — Ismael Luceno 6 years ago 042e591
Fix build issues related to non-UTF-8 LC_ALL

Replace all instances of LC_ALL=C with LC_ALL=C.UTF-8.
2 files changed, 4 insertions(+), 4 deletions(-)

M usr/sbin/cast
M var/lib/sorcery/modules/libgpg
M usr/sbin/cast => usr/sbin/cast +1 -1
@@ 257,7 257,7 @@ function cast_spell()  { (

  # HACK for bug 2910 and 10546
  local saved_lc_all=$LC_ALL
  export LC_ALL=C
  export LC_ALL=C.UTF-8

  export DISTCC_DIR="$SOURCE_DIRECTORY/.distcc"


M var/lib/sorcery/modules/libgpg => var/lib/sorcery/modules/libgpg +3 -3
@@ 52,7 52,7 @@ function gpg_verify_signature() { # $1 sig $2 file $3 pubring $4 algo var
    return 200
  else
    local output=$TMP_DIR/$(smgl_basename $file).gpgout
    LC_ALL=C gpg --no-default-keyring  \
    LC_ALL=C.UTF-8 gpg --no-default-keyring  \
               --always-trust        \
               --keyring $keyring    \
               --batch               \


@@ 341,7 341,7 @@ function gpg_user_query() {
function gpg_hashsum() {
  local algorithm=$1
  local file=$2
  LC_ALL=C gpg --print-md "$algorithm" "$file"| tr -d '\n '  |cut -f2 -d:|
  LC_ALL=C.UTF-8 gpg --print-md "$algorithm" "$file"| tr -d '\n '  |cut -f2 -d:|
                                       tr 'A-F' 'a-f'|tr -d '\n'
  echo "  $file"
}


@@ 353,7 353,7 @@ function gpg_hashsum() {
## This assumes the caller has already verified that gpg is installed.
#---------------------------------------------------------------------
function gpg_get_hashes() {
  LC_ALL=C gpg --version 2> /dev/null | awk -F: '/^Hash/ { gsub(","," ",$2); print tolower($2); }'
  LC_ALL=C.UTF-8 gpg --version 2> /dev/null | awk -F: '/^Hash/ { gsub(","," ",$2); print tolower($2); }'
}

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