-
Harald Sitter authored
since qaptworker is dbus spwaned it has a minimal env, in fact it doesn't even have a locale. to that extent transactions offer a way for the client to set a locale on the transaction such that the apt output would be localized and properly encoded. with debfiles however we decode the file path and pass it to dpkg for installation which entirely bypassses apt. two problems are caused by this: a) the locale is not set up properly as the transaction doesn't use the same code paths as a regular apt transaction would b) qlocale & qtextcodec are constructed way before we work on the transaction such that we then decode paths with locale C and latin1 decoder which results in bogus path decoding to resolve this the debfile code path will now correctly call the function used to set up the transaction for apt interaction. this has the additional boon of making debconf integration actually work. and additionally this very code path will now explicitly set a qtextcodec based on what it could parse from the transaction locale. the result of which should be that deb files from !latin1 paths now works as expected. long term both changs are nothing more than workarounds, the transaction setup bits should be moved somewhere so that it can be called by both apt bound transactions and debfile transactions (i.e. remove the tie to apt, even though effectively there is none anyway, so mostly refactor). for the textcodec workaround two new properties need to be added to the dbus interfaces, passing QLocale::name and QTextCodec::name such that we can correctly reconstruct the localization envrionment in the worker.
1dd424c1