Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Recent locale related regression causes crashes in debconf.py and python-apt #27
Comments
|
Nah, I don't really know what exactly started that, but it should be fixed in 1.2.16 since 2 weeks. |
julian-klode
closed this
Nov 28, 2016
|
To be clear: I uploaded that to xenial 2 weeks ago, it just has not been accepted into -proposed yet. In the meantime, 1.2.17 sneaked in to fix some other bugs as well. You can of course use the PPA in the meantime: |
|
Argh, the PPA is at: https://launchpad.net/~deity/+archive/ubuntu/apt-1.2 - It currently has 1.2.16 (labelled as RC1), but I just uploaded the 1.2.17 hotfix there as well. |
clefebvre
commented
Nov 28, 2016
|
Thanks @julian-klode, do you have a link to the commit which fixes it? |
|
It should be commit 1e352b9, but that really depends on all the others ones before it. |
clefebvre
commented
Nov 28, 2016
|
Thanks @julian-klode |
clefebvre
commented
Jan 5, 2017
|
Hi @julian-klode, Is something preventing 1.2.17 from getting into Xenial? In http://changelogs.ubuntu.com/changelogs/pool/main/a/apt/apt_1.2.15ubuntu0.2/changelog you applied the 1.2.17 -> 1.2.18 security fix but it's still missing the commits provided by 1.2.16 and 1.2.17? |
|
Well, release team needs to process it at some point. This takes a few weeks or months... |
clefebvre
commented
Jan 5, 2017
|
Thanks @julian-klode. |
clefebvre commentedNov 28, 2016
Hi @julian-klode, thanks for keeping an eye on github.
Ubuntu Xenial recently updated its version of apt and included commits all the way to 1.3.1.
Here is their changelog: http://changelogs.ubuntu.com/changelogs/pool/main/a/apt/apt_1.2.15/changelog
Starting with their version 1.2.15, we're observing crashes in Python applications (such as mintinstall which uses python-apt or ubiquity which uses debconf.py) when the locale uses a comma for thousand separators as opposed to a dot.
Running these programs with LC_NUMERIC=C prevents the issue from happening.
In python-apt's base.py script, the following call fails if percent includes a comma:
float(percent)In debconf's debconf.py, the following call fails also:
status = int(status)There are probably other scripts which fail like that. I just found these two.
When playing with python-apt I noticed that the "percent" value returned by dpkg was now localized.
It used to start at 0.0000 no matter what locale was used.
It now starts at 0.0000 in English, which is fine... but at 0,0000 in French, Swedish, Russian and many other languages which use commas instead of dots.
Python is unable to cast that into a float and throws an exception.
Looking at the APT commits, I see this:
0fb16c3
Although it looks fine.. could it be responsible for these regressions?