Recent locale related regression causes crashes in debconf.py and python-apt #27

Closed
clefebvre opened this Issue Nov 28, 2016 · 9 comments

Comments

Projects
None yet
2 participants

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?

Contributor

julian-klode commented Nov 28, 2016

Nah, I don't really know what exactly started that, but it should be fixed in 1.2.16 since 2 weeks.

Contributor

julian-klode commented 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:

Contributor

julian-klode commented Nov 28, 2016

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.

Thanks @julian-klode, do you have a link to the commit which fixes it?

Contributor

julian-klode commented Nov 28, 2016

It should be commit 1e352b9, but that really depends on all the others ones before it.

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?

Contributor

julian-klode commented Jan 5, 2017

Well, release team needs to process it at some point. This takes a few weeks or months...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment