kpackagekit can't update package cache

Bug #578605 reported by Oleg Tsarev
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kpackagekit (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: kpackagekit

Kpackagekit complete "update package cache" with error

Error Type:
Error Value: coercing to Unicode: need string or buffer, exceptions.SystemError found
File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 2216, in
main()
File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 2213, in main
run(args, options.single)
File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 2175, in run
backend.dispatcher(args)
File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 699, in dispatcher
self.dispatch_command(args[0], args[1:])
File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 606, in dispatch_command
self.refresh_cache(force)
File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 202, in _locked_cache
func(*args, **kwargs)
File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1498, in refresh_cache
format_string(error.message))
File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 723, in format_string
txt = unicode(text, encoding, errors='replace')

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: kpackagekit 0.5.4-0ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue May 11 05:33:09 2010
ProcEnviron:
 SHELL=/bin/bash
 LANG=ru_RU.UTF-8
 LANGUAGE=
SourcePackage: kpackagekit

Revision history for this message
Oleg Tsarev (tsarev) wrote :
Revision history for this message
Oleg Tsarev (tsarev) wrote :

Also i include my /etc/apt/sources.list

Revision history for this message
Oleg Tsarev (tsarev) wrote :

My patch to this bug

sarev@developer:~$ cat packagekit-backend-apt.patch
--- /usr/share/PackageKit/helpers/apt/aptBackend.py 2010-03-08 22:46:16.000000000 +0300
@@ -1495,7 +1495,7 @@
             # reporting. We only receive a failure string.
             # FIXME: Doesn't detect if all downloads failed - bug in python-apt
             self.message(MESSAGE_REPO_METADATA_DOWNLOAD_FAILED,
- format_string(error.message))
+ format_string(unicode(error)))
         self._open_cache(prange=(95,100))
         self.percentage(100)

Package "packagekit-backend-apt" use deprecated in python 2.6 method "error.message", and method format_string get to input SytemError instead of normal string.

By the way, this is a error from apt with my trouble.
"FetchFailedException(SystemError('W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/Release Unable to find expected entry non-free/binary-amd64/Packages in Meta-index file (malformed Release file?)\n, W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/Release Unable to find expected entry non-free/binary-amd64/Packages in Meta-index file (malformed Release file?)\n, W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/Release Unable to find expected entry non-free/binary-amd64/Packages in Meta-index file (malformed Release file?)\n, E:Some index files failed to download, they have been ignored, or old ones used instead.',),)"

Now i just call unicode conversion for error, and format_string work correct.

How can i help in improve diagnostic?

Revision history for this message
Oleg Tsarev (tsarev) wrote :

Wow, after my patch i found warning icon in the tray with message about failed index download...
Great!

Revision history for this message
Aswarp (aswarp2002) wrote :

I will describe my sympthoms:
Fresh install of KUbuntu 10.10.
I log in and get connected to a WiFi connection. I run the rekonq new embedded web browser and it offers details about some packages to be installed (flash player, etcetera). I try to install those and I am asked for authentication. I choose my username and try to type in a password but nothing happens. Apparently, password pop-up dialogs have some trouble in this new release, because nothing gets written. So I can not authenticate and install the packages.
So I try Firefox web browser instead, but it does not come preinstalled. I have to install it and I am asked again for password confirmation, and again it won't work.
So I try tu update my package list and web browsers from the terminal. I try apt-get, aptitude and synaptic, but none of them will work. I enter /var/lib/dpkg and sudo rename the archive 'lock' into 'lock_old' and try to run apt-get again, but to no avail.
I try kdesudo kpackagekit and it says that I need to update my software source (as I if didn't know by now...), but when I try, a message appears telling that the package cache could not be opened.
And that is it. I hope that you can help me. The patch above does not help me clarify the problem or its solution because I do not understand what it is or how to use it, and I think that the average user wouldn't either.
Cheers

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.