]> arthur.barton.de Git - bup.git/commit
Only change LC_CTYPE for bup-python itself, not sh or subprocesses
authorRob Browning <rlb@defaultvalue.org>
Thu, 26 Dec 2019 00:18:32 +0000 (18:18 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 11 Jan 2020 20:39:27 +0000 (14:39 -0600)
commit34611847bba7a9bddcd80bb84badd911bff98c84
tree1e550df8521ab748a75cba0f6e080385c317b2a9
parent813aa7d002f141db50ff6d2d276542ed91088043
Only change LC_CTYPE for bup-python itself, not sh or subprocesses

With the previous approach, bash would complain on systems that don't
provide the ISO-8859-1 locale (python always supports it), and those
complaints would break some tests.

In any case, since the original hack was only intended to affect
bup-python, try to make that the case.  Specify the LC_CTYPE only to
python via env (so bash won't see it), and then undo the environment
changes at the top of cmd/bup so they won't affect unrelated
subprocesses.

Thanks to Johannes Berg for reporting the problem and helping devise
the fix.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/bup
cmd/python-cmd.sh
lib/bup/compat.py