You are not logged in.
Pages: 1
I use Arch with Turkish locale. When I run "checkupdates", it stops after 2 seconds. But when I run "LC_ALL=C checkupdates", it really checks updates.
Why?
Offline
It's only a 24 line script - and almost everything it does is in 4 of the last five lines. So just work through the script and see which part has a problem with the locale. I wouldn't be surprised if it was grep on the last line. That's about the only thing I could imagine actually being sensitive to the locale.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Nope, nothing worked so far, except LC'ing full script itself.
Offline
┌─[Veles ~]
└─╼ env LANG=tr_TR.UTF-8 checkupdates
+ declare -r myname=checkupdates
+ declare -r myver=4.2.1
+ (( 0 > 0 ))
+ [[ -z '' ]]
+ CHECKUPDATES_DB=/tmp/checkup-db-jason/
+ trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT
+ DBPath=/var/lib/pacman/
++ awk '-F *= *' '$1 ~ /DBPath/ { print $1 "=" $2 }' /etc/pacman.conf
+ eval '#DBPath=/var/lib/pacman/'
+ mkdir -p /tmp/checkup-db-jason/
+ ln -s /var/lib/pacman//local /tmp/checkup-db-jason/
+ fakeroot pacman -Sy --dbpath /tmp/checkup-db-jason/ --logfile /dev/null
+ pacman -Qqu --dbpath /tmp/checkup-db-jason/
+ grep -v '\[.*\]'
+ exit 0
+ rm -f /tmp/checkup-db-jason//db.lckOffline
What did you try?
You could try adding
set -xsomewhere at the beginning of the script (right after the shebang) and check the output to see if it blocks at some point.
EDIT: jasonwryan was faster
But what's your output? I've got no issues running it with tr_TR.UTF-8 either (it correctly finds the packages).
Last edited by ayekat (2015-09-14 23:55:08)
Offline
Well, strange things are happening.
$ checkupdates
$ env LANG=tr_TR.UTF-8 checkupdates
$ env LANG=en_US.UTF-8 checkupdates
gnutls
graphite
libtasn1
$ env LANG=tr_TR.UTF-8 checkupdates
gnutls
graphite
libtasn17
$ rm -r /tmp/checkup-db-arda/
$ env LANG=tr_TR.UTF-8 checkupdates
$Last edited by betseg (2015-09-15 00:14:16)
Offline
Pages: 1