package wmanager tag 605043 + pending thanks On Sat, Nov 27, 2010 at 02:28:33AM +0900, Yamada Yohei wrote: > Package: wmanager > Version: 0.2.1-8 > Severity: normal > > Hi, > > When LANG=ja_JP.UTF-8 , wmanagerrc-update fails and empties ~/.wmanagerrc .
Ah, yes. Actually, I'm also using it in a non-English locale, but I guess nobody took the time to translate the update-alternatives output into Bulgarian yet, so I never noticed this. Thanks! [snip] > Patch: > > --- /usr/bin/wmanagerrc-update 2008-07-03 00:22:02.000000000 +0900 > +++ ./wmanagerrc-update 2010-11-27 01:40:31.000000000 +0900 > @@ -21,7 +21,7 @@ > { > cat "$HOME/.wmanagerrc.user" 2>/dev/null || true > [ ! -x /usr/sbin/update-alternatives ] || > - /usr/sbin/update-alternatives --display x-window-manager \ > + LANG=C /usr/sbin/update-alternatives --display x-window-manager \ > |perl -ne ' > m{^(/.*) - priority (\d+)$} or next; > push @{$p{$2}}, $1; Thanks for the bug report and the patch! However, could you please try the attached patch instead and tell me if it works for you? It seems to work for me here (with LANG=ja_JP.UTF-8 --display fails just as with you, and --query works). Once again, thanks for your time, your bug report and your patch! G'luck, Peter -- Peter Pentchev r...@space.bg r...@ringlet.net r...@freebsd.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If this sentence were in Chinese, it would say something else.
commit b4cc6dc82037dbf431b73076d997bcd8aa4b5703 Author: Peter Pentchev <r...@ringlet.net> Date: Sun Nov 28 13:32:53 2010 +0200 Close #605043 by using update-alternatives --query, not --display. This unbreaks wmanagerrc-update in non-English locales, or rather in non-English locales with translated update-alternatives messages. [snip the changelog patch, it will not apply in your case :)] diff --git a/wmanagerrc-update b/wmanagerrc-update index cd683df..0e3971b 100644 --- a/wmanagerrc-update +++ b/wmanagerrc-update @@ -21,10 +21,10 @@ { cat "$HOME/.wmanagerrc.user" 2>/dev/null || true [ ! -x /usr/sbin/update-alternatives ] || - /usr/sbin/update-alternatives --display x-window-manager \ + /usr/sbin/update-alternatives --query x-window-manager \ |perl -ne ' - m{^(/.*) - priority (\d+)$} or next; - push @{$p{$2}}, $1; + m{^Alternative:\s+([/\w]+)$} and $alt = $1; + m{^Priority:\s+(\d+)$} and push @{$p{$1}}, $alt; END { print map {"$_\000"}
signature.asc
Description: Digital signature