Comment 12 for bug 680328

Revision history for this message
Colin Watson (cjwatson) wrote : Re: Many postinst scripts fail using either AptDaemon, PackageKit, or QApt

There's another failure at least in PackageKit: it sets the locale to the result of setlocale(LC_ALL, ""), which with current libc is something like this:

  LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=en_GB.UTF-8;LC_TIME=en_GB.UTF-8;LC_COLLATE=C;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_AG.utf8;LC_PAPER=en_GB.UTF-8;LC_NAME=en_GB.UTF-8;LC_ADDRESS=en_GB.UTF-8;LC_TELEPHONE=en_GB.UTF-8;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=en_GB.UTF-8

Setting LANG to that is ... not so helpful. It would be more helpful to get a single locale category. Perhaps ideally PackageKit ought to get each category separately and marshal them over to the backend; in the short term, perhaps LC_MESSAGES would be a good category to fetch, since PackageKit seems to generally use this for localisation of messages.