find_package_desktopfile() needs more smarts

Bug #1147528 reported by James Hunt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

apport/fileutils.py:find_package_desktopfile() finds 'the' desktop file for a given package. However, if any of the following are true, problems will result:

(1) A package contains multiple .desktop files.
(2) A package contains a single desktop file that does not relate to the package itself.

The current Upstart PPA currently satisfies (2) above since it provides /usr/share/upstart/xdg/autostart/gnome-settings-daemon.desktop. Note that this is not the desktop file for Upstart itself.

The simplest change would probably be to make find_package_desktopfile() only look for .desktop files in /usr/share/applications/ within the package that crashed.

Revision history for this message
Martin Pitt (pitti) wrote :

> (1) A package contains multiple .desktop files.

This is already covered, in that case find_package_desktopfile() returns None.

> only look for .desktop files in /usr/share/applications/ within the package

But that would exclude autostart desktop files, which we specifically want to include as those kinds of packages are also "user-visible" in most cases, so we don't want to describe them as "system service". But we can certainly filter for only those and /usr/share/applications/.

Changed in apport:
status: New → Triaged
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in trunk r2601.

affects: apport → apport (Ubuntu)
Changed in apport (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.9.1-0ubuntu1

---------------
apport (2.9.1-0ubuntu1) raring; urgency=low

  * New upstream release:
    - launchpad.py: Add support for filing bugs as private. Document this in
      doc/crashdb-conf.txt. (LP: #1144647)
    - Fix crash in error() and warning() if there is no sys.stderr.
      (LP: #1012445)
    - Fix Turkish translation to add missing keyboard accelerator.
      (LP: #648750)
    - fileutils.py, find_package_desktopfile(): Restrict to autostart and
      application .desktop files. (LP: #1147528)
    - apt/dpkg get_modified_files(): Fix crash when encountering non-ASCII
      file names in an ASCII locale. (LP: #1044014)
  * Bump Standards-Version to 3.9.4 (no changes necessary).
 -- Martin Pitt <email address hidden> Thu, 07 Mar 2013 16:04:35 +0100

Changed in apport (Ubuntu):
status: Fix Committed → 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.