expects to be able to source /etc/lsb-release
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
localechooser (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Binary package hint: localechooser
localechooser expects to be able to source the /etc/lsb-release file as shell:
[ -f /etc/lsb-release ] && . /etc/lsb-release
Strictly speaking, this isn't safe. The code in lsb_release itself that parses /etc/lsb-release is as follows:
for line in open('/
line = line.strip()
if not line:
# Skip invalid lines
if not '=' in line:
var, arg = line.split('=', 1)
if var.startswith(
var = var[8:]
if arg.startswith('"') and arg.endswith('"'):
In other words, lsb_release doesn't require values to be double-quoted even if they contain spaces. However, if you create an /etc/lsb-release file with spaces in any of its values and omit the double quotes around it, then localechooser will break.
We should parse this file properly.
High because this has been known to break derived distributions and generate support requests.