Bug 543716
| Summary: | packagekitd does not accept hint values with an embedded '=' char | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | James Ralston <ralston> |
| Component: | PackageKit | Assignee: | Richard Hughes <richard> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 12 | CC: | rhughes, richard, smparrish |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 2.28.3-0.1.20091211git.fc12 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-12-27 20:28:28 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
James Ralston
2009-12-02 22:37:07 UTC
Ok, this may be related.
On my Fedora 11 desktop (which properly notifies me of updates), this is what happens when I run pkcon get-updates:
$ pkcon get-updates
bugfix xorg-x11-drv-intel-2.7.0-9.fc11 Xorg X11 Intel video driver
bugfix openoffice.org-brand-1:3.1.1-19.9.fc11 Core brand for OpenOffice.org
security bind-libs-32:9.6.1-7.P2.fc11 Libraries used by the BIND DNS packages
...
However, when I run the same command on my Fedora 12 laptop, here's what happens:
$ pkcon get-updates
Getting updates [ ] (0%)
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-Finished' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-Package' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-Details' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-UpdateDetail' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-Transaction' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-DistroUpgrade' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-RequireRestart' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-Files' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-RepoSignatureRequired' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-EulaRequired' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-ErrorCode' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-Message' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-MediaChangeRequired' which is not registered
** (pkcon:10702): WARNING **: Attempt to disconnect from signal 'org-freedesktop-PackageKit-Transaction-Changed' which is not registered
[=========================]
Fatal error: Could not parse 'locale=LC_CTYPE=en_US.UTF-8;LC_NUMERIC=en_US.UTF-8;LC_TIME=en_DK.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=en_US.UTF-8;LC_ADDRESS=en_US.UTF-8;LC_TELEPHONE=en_US.UTF-8;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=en_US.UTF-8'
Now, on both systems, I set LC_TIME in my ~/.i18n file:
$ cat ~/.i18n
LC_TIME="en_DK.UTF-8"
The only reason I do this is because I hate the MM/DD/YYYY date format with a flaming passion; I want my dates to appear in ISO 8601 format:
$ env LC_TIME=en_US date "+%x"
12/02/2009
$ env LC_TIME=en_DK date "+%x"
2009-12-02
Having LC_TIME set is what appears to be making pkcon on my laptop blow up, because when I deliberately unset LC_TIME, pkcon works:
$ env -u LC_TIME pkcon get-updates
Getting updates [=========================]
Starting [=========================]
Getting information [=========================]
Bug fix openoffice.org-ure-1:3.1.1-19.20.fc12.x86_64 UNO Runtime Environment
Normal perl-libs-4:5.10.0-86.fc12.x86_64 The libraries for the perl runtime
Bug fix openoffice.org-langpack-en-1:3.1.1-19.20.fc12.x86_64 English language pack for OpenOffice.org
...
Interestingly, it seems to fail if LC_TIME is set to *any* valid locale, and succeeds if it is either unset or is set to nonsense:
$ env -u LC_TIME pkcon get-updates # works
$ env LC_TIME=en_US pkcon get-updates # FAILS
$ env LC_TIME=en_DK pkcon get-updates # FAILS
$ env LC_TIME=foobar pkcon get-updates # works
On my Fedora 11 desktop, pkcon always succeeds, regardless of whether LC_TIME is unset, set to a valid locale, or set to gibberish.
(The seems to be true for any of the LC_* environment variables.)
So, this problem might actually be the fault of PackageKit, not gnome-packagekit.
I've found the bug and fixed it upstream:
commit ea73b10010b4aeddd78c8494ea93fa1c6fb83762
Author: Richard Hughes <richard>
Date: Thu Dec 3 09:54:29 2009 +0000
Do not split more than one locale hint to fix setting LC_ variables. Fixes rh#543716
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index d919337..1d32e20 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -4682,7 +4682,7 @@ pk_transaction_set_hints (PkTransaction *transaction, gchar **hints, DBusGMethod
/* parse */
for (i=0; hints[i] != NULL; i++) {
- sections = g_strsplit (hints[i], "=", 3);
+ sections = g_strsplit (hints[i], "=", 2);
if (g_strv_length (sections) == 2) {
ret = pk_transaction_set_hint (transaction, sections[0], sections[1], &error);
} else {
They'll be a new release of PackageKit available on Monday that will fix this bug for you. Thanks for reporting (and debugging) this.
Happy to help. (Still not sure why I only saw the bug on my laptop, but as long as the bug is fixed, that's the important thing...) I'll report back whether the next (updates-testing, I'm assuming) version of PackageKit fixes the bug for me. PackageKit-0.5.5-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/PackageKit-0.5.5-1.fc12 PackageKit-0.5.5-1.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update PackageKit'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-13033 gnome-packagekit-2.28.3-0.1.20091211git.fc12,kpackagekit-0.5.2-1.fc12,PackageKit-0.5.5-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/gnome-packagekit-2.28.3-0.1.20091211git.fc12,kpackagekit-0.5.2-1.fc12,PackageKit-0.5.5-1.fc12 PackageKit-0.5.5-1.fc12 fixes the problem for me. gnome-packagekit-2.28.3-0.1.20091211git.fc12, kpackagekit-0.5.2-1.fc12, PackageKit-0.5.5-1.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update gnome-packagekit kpackagekit PackageKit'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-13421 gnome-packagekit-2.28.3-0.1.20091211git.fc12, kpackagekit-0.5.2-1.fc12, PackageKit-0.5.5-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. |