update-software-center fails on every .desktop file

Bug #740372 reported by Matt Zimmerman
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: software-center

On the most recent update, I got a spew of errors from software-center.postinst:

2011-03-22 17:53:04,286 - softwarecenter.db.update - WARNING - The file: '/usr/share/app-install/desktop/gdebi.desktop' could not be read correctly. The application associated with this file will not be included in the software catalog. Please consider raising a bug report for this issue with the maintainer of that application
2011-03-22 17:53:04,299 - softwarecenter.db.update - WARNING - The file: '/usr/share/app-install/desktop/gmult.desktop' could not be read correctly. The application associated with this file will not be included in the software catalog. Please consider raising a bug report for this issue with the maintainer of that application
2011-03-22 17:53:04,302 - softwarecenter.db.update - WARNING - The file: '/usr/share/app-install/desktop/horgand.desktop' could not be read correctly. The application associated with this file will not be included in the software catalog. Please consider raising a bug report for this issue with the maintainer of that application
2011-03-22 17:53:04,304 - softwarecenter.db.update - WARNING - The file: '/usr/share/app-install/desktop/gmchess.desktop' could not be read correctly. The application associated with this file will not be included in the software catalog. Please consider raising a bug report for this issue with the maintainer of that application
2011-03-22 17:53:04,307 - softwarecenter.db.update - WARNING - The file: '/usr/share/app-install/desktop/yabause-qt.desktop' could not be read correctly. The application associated with this file will not be included in the software catalog. Please consider raising a bug report for this issue with the maintainer of that application
2011-03-22 17:53:04,310 - softwarecenter.db.update - WARNING - The file: '/usr/share/app-install/desktop/crawl-tiles.desktop' could not be read correctly. The application associated with this file will not be included in the software catalog. Please consider raising a bug report for this issue with the maintainer of that application
2011-03-22 17:53:04,313 - softwarecenter.db.update - WARNING - The file: '/usr/share/app-install/desktop/eqsl.desktop' could not be read correctly. The application associated with this file will not be included in the software catalog. Please consider raising a bug report for this issue with the maintainer of that application

...and so on for every .desktop file on the system. This is because the catch-all exception handler in softwarecenter/db/update.py is being triggered. If I disable that handler, this is the crash that I get.

That exception handler should preferably be more specific so that it doesn't hide errors like this one.

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: software-center 3.1.24 [modified: usr/share/software-center/softwarecenter/db/update.py]
ProcVersionSignature: Ubuntu 2.6.38-7.36-generic 2.6.38
Uname: Linux 2.6.38-7-generic x86_64
Architecture: amd64
Date: Tue Mar 22 18:22:44 2011
ExecutablePath: /usr/share/software-center/update-software-center
InterpreterPath: /usr/bin/python2.7
ProcCmdline: /usr/bin/python /usr/sbin/update-software-center
ProcEnviron:
 LANG=en_US.UTF-8
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 LC_COLLATE=C
 SHELL=/bin/zsh
PythonArgs: ['/usr/sbin/update-software-center']
SourcePackage: software-center
Title: update-software-center crashed with TypeError in index_app_info_from_parser(): argument of type 'NoneType' is not iterable
UpgradeStatus: Upgraded to natty on 2011-02-10 (39 days ago)
UserGroups:

Revision history for this message
Matt Zimmerman (mdz) wrote :
visibility: private → public
Revision history for this message
Matt Zimmerman (mdz) wrote :

axi_values = parse_axi_values_file()

...

perseus:[~] PYTHONPATH=/usr/share/software-center python
Python 2.7.1+ (r271:86832, Feb 24 2011, 15:00:15)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from softwarecenter.db.database import parse_axi_values_file
>>> print parse_axi_values_file()
None

...

def parse_axi_values_file(filename="/var/lib/apt-xapian-index/values"):

...

perseus:[~] less /var/lib/apt-xapian-index/values
/var/lib/apt-xapian-index/values: No such file or directory

...which is because I don't have apt-xapian-index installed.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks, I fixed the crash in bzr now but I wonder why apt-xapian-index is not installed/no logner installed. Could you please have a look in /var/log/apt/history.log when it was removed?

Changed in software-center (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 740372] Re: update-software-center fails on every .desktop file

On Tue, Mar 22, 2011 at 08:48:08PM -0000, Michael Vogt wrote:
> Thanks, I fixed the crash in bzr now but I wonder why apt-xapian-index
> is not installed/no logner installed. Could you please have a look in
> /var/log/apt/history.log when it was removed?

I believe I removed it explicitly, because I don't use it and the cron job
takes a long time and bogs down my system.

Thanks for fixing the crash.

--
 - mdz

tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 3.1.24.1

---------------
software-center (3.1.24.1) natty; urgency=low

  [ Michael Vogt ]
  * softwarecenter/db/database.py:
    - return empty dict instead of None if axi is not installed
      (LP: #740372)

  [ Gary Lasker ]
  * softwarecenter/view/softwarepane.py,
    softwarecenter/view/widgets/actionbar.py:
    - visual improvements for the action bar (LP: #644454)
    - display buttons in the action bar as gtk buttons
      rather than as links (LP: #635062)
 -- Michael Vogt <email address hidden> Wed, 23 Mar 2011 21:00:39 +0100

Changed in software-center (Ubuntu):
status: In Progress → Fix Released
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.