Give a more explicit message when ubuntu-bug decides a package is "not a genuine Ubuntu package"

Bug #559345 reported by Ronan Jouchet on 2010-04-09
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Low
Unassigned

Bug Description

When running ubuntu-bug <PackageName>, if PackageName is from a PPA, Apport refuses to do its job and says:
"The problem cannot be reported.
This is not a genuine Ubuntu package"

This is 100% correct expected behavior, but this message could be improved a bit to tell the user what's going on. I suggest something similar to:
"The problem cannot be reported.
<PackageName> is not a genuine Ubuntu package.
Apport has detected an unsupported version of <PackageName> in the <PPAName> Personal Package Archive activated in your Software sources. Please do the following and try again:
1. use System > Administration > Software Sources to remove the PPA
2. use System > Administration > Synaptic Package Manage to revert to the official Ubuntu version"

From what I see in the source in apport/ui.py:80, there are two cases:
- Package not installed
- Package coming from a PPA
I'm just digging into Apport source so I was unable to fully implement what I am proposing (e.g. give the PPA name), but I am pushing a very simple patch that at least separates the two cases and tries to give to the user a better explanation of what's going on. Please guide me if my patch needs improvement, or improve it on your own.

Related branches

Ronan Jouchet (ronj) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Martin Pitt (pitti) wrote :

Fixed in trunk r1996.

affects: apport → apport (Ubuntu)
Changed in apport (Ubuntu):
importance: Undecided → Low
status: New → Fix Committed
Changed in apport (Ubuntu):
status: New → Confirmed
Ronan Jouchet (ronj) wrote :

Hi Martin!
Great to see it merged, but as you say, it has been quite a long time since my fix :D . Did you test it, is it still functional?

Launchpad Janitor (janitor) wrote :
Download full text (4.3 KiB)

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

---------------
apport (1.24-0ubuntu1) precise; urgency=low

  * New upstream release 1.23.1:
    - apport/crashdb.py: Ensure that duplicate table only has one entry per
      report ID.
    - apport-retrace: Pass correct executable path to gdb in --gdb with
      --sandbox mode.
    - apport-retrace: Do not leave behind temporary directories on errors.
    - apport-retrace: Drop assertion failure for existance of "Stacktrace".
      This isn't present in the case of gdb crashing, and there is not much we
      can do about it. This should not break the retracer.
    - apport/report.py: Unwind XError() from stack traces for the
      "StacktraceTop" field, as they take a significant part of the trace.
      This causes bugs to be duplicated which really have different causes.
  * New upstream release 1.24:
   - apport-retrace: Add --timestamp option to prepend a timestamp to log
     messages. This is useful for batch operations.
   - crash-digger: Call apport-retrace with --timestamps, to get consistent
     timestamps in log output.
   - hookutils.py: Add two new functions attach_gsettings_package() and
     attach_gsettings_schema() for adding user-modified gsettings keys to a
     report. (LP: #836489)
   - hookutils.py: Add new function in_session_of_problem() which returns
     whether the given report happened in the currently running XDG session.
     This can be used to determine if e. g. ~/.xsession-errors is relevant and
     should be attached.
   - backends/packaging-apt-dpkg.py, install_packages(): Also copy
     apt/sources.list.d/ into sandbox.
   - backends/packaging-apt-dpkg.py, install_packages(): Install apt keyrings
     from config dir or from system into sandbox. (LP: #856216)
   - packaging.py, backends/packaging-apt-dpkg.py: Define that
     install_packages() should return a SystemError for broken
     configs/unreachable servers etc., and fix the apt/dpkg implementation
     accordingly.
   - apport-retrace: Don't crash, just give a proper error message if servers
     are unreachable, or configuration files are broken. (LP: #859248)
   - backends/packaging-apt-dpkg.py: Fix crash when
     /etc/apport/native-origins.d contains any files. (LP: #865199)
   - hookutils, recent_logfile(): Fix invalid return value if log file is not
     readable. (LP: #819357)
   - test/crash: Fix race condition in the "second instance terminates
     immediately" check.
   - hookutils.py: Replace attach_gconf() with a no-op stub. It used static
     python modules like "gconf" which broke the PyGI GTK user interface, and
     gconf is rather obsolete these days.
   - ui.py, open_url(): Greatly simply and robustify by just using xdg-open.
     This already does the right thing wrt. reading the default browser from
     GNOME, KDE, XCE, and other desktops. (LP: #198449)
   - data/general-hooks/generic.py: Only attach ~/.xsession_errors if the bug
     is reported in the same XDG session as the crash happened. (LP: #869974)
   - Ignore crashes for programs which got updated in between the crash and
     reporting. (LP: #132904)
   - Special-case crashes of 'twistd': Try to determin...

Read more...

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers