Merge lp:~roadmr/checkbox/1201126-unlocalized-audio-test into lp:checkbox

Proposed by Daniel Manrique
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 2368
Merged at revision: 2368
Proposed branch: lp:~roadmr/checkbox/1201126-unlocalized-audio-test
Merge into: lp:checkbox
Diff against target: 24 lines (+3/-1)
2 files modified
checkbox-old/checkbox/scripts/audio_settings.py (+1/-1)
checkbox-old/debian/changelog (+2/-0)
To merge this branch: bzr merge lp:~roadmr/checkbox/1201126-unlocalized-audio-test
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Needs Information
Review via email: mp+185344@code.launchpad.net

Commit message

Ensures that pactl commands are run on a properly unlocalized environment. Code was setting LANG to "C", but that seems to not reset LANGUAGE which is still honored by pactl. Setting LANG to POSIX instead produces the desired behavior.

Description of the change

Ensures that pactl commands are run on a properly unlocalized environment. Code was setting LANG to "C", but that seems to not reset LANGUAGE which is still honored by pactl. Setting LANG to POSIX instead produces the desired behavior.

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Is this really doing something? AFAIK C *is* POSIX

review: Needs Information
Revision history for this message
Daniel Manrique (roadmr) wrote :

In my experiments C doesn't work and POSIX does (go ahead, give it a try, the bug has a 2-line repro case and since you have polish localization already installed you can just use that).

This despite my research indicating they are the same, as you say. http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html

An alternative would be setting LANG=C.UTF-8 *and* LANGUAGE=en_US, that also worked, I just thought it was visually cleaner to set LANG to POSIX.UTF-8 only. But if you think it's semantically clearer the other way I'm fine with that.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-old/checkbox/scripts/audio_settings.py'
2--- checkbox-old/checkbox/scripts/audio_settings.py 2013-06-14 13:29:13 +0000
3+++ checkbox-old/checkbox/scripts/audio_settings.py 2013-09-12 19:26:06 +0000
4@@ -40,7 +40,7 @@
5 entry_pattern = "Name: %s.*?(?=Properties)"
6
7
8-def unlocalized_env(reset={"LANG": "C.UTF-8"}):
9+def unlocalized_env(reset={"LANG": "POSIX.UTF-8"}):
10 """
11 Create un-localized environment.
12
13
14=== modified file 'checkbox-old/debian/changelog'
15--- checkbox-old/debian/changelog 2013-09-12 15:18:15 +0000
16+++ checkbox-old/debian/changelog 2013-09-12 19:26:06 +0000
17@@ -6,6 +6,8 @@
18 (LP: #1206016)
19 * Removed references to Ubuntu Friendly due to sunsetting of the project.
20 (LP: #1224533)
21+ * Ensured that pactl commands are run on a properly unlocalized environment
22+ (LP: #1201126)
23
24 -- Brendan Donegan <brendan.donegan@canonical.com> Mon, 09 Sep 2013 09:30:32 +0100
25

Subscribers

People subscribed via source and target branches