You are not logged in.

#1 2015-09-14 22:40:32

betseg
Member
From: Turkey
Registered: 2015-04-25
Posts: 182

checkupdates and locale

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

#2 2015-09-14 23:05:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: checkupdates and locale

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

#3 2015-09-14 23:42:58

betseg
Member
From: Turkey
Registered: 2015-04-25
Posts: 182

Re: checkupdates and locale

Nope, nothing worked so far, except LC'ing full script itself.

Offline

#4 2015-09-14 23:49:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: checkupdates and locale

┌─[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.lck

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2015-09-14 23:50:27

ayekat
Member
Registered: 2011-01-17
Posts: 1,632

Re: checkupdates and locale

What did you try?

You could try adding

set -x

somewhere 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 smile 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)


pkgshackscfgblag

Offline

#6 2015-09-15 00:00:41

betseg
Member
From: Turkey
Registered: 2015-04-25
Posts: 182

Re: checkupdates and locale

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

Board footer

Powered by FluxBB