Merge lp:~mvo/apport/apport-checkreports-addition into lp:~apport-hackers/apport/trunk
Status: | Merged |
---|---|
Merged at revision: | 1896 |
Proposed branch: | lp:~mvo/apport/apport-checkreports-addition |
Merge into: | lp:~apport-hackers/apport/trunk |
Diff against target: |
83 lines (+21/-17) 3 files modified
apport/fileutils.py (+11/-0) apport_python_hook.py (+2/-13) data/apport-checkreports (+8/-4) |
To merge this branch: | bzr merge lp:~mvo/apport/apport-checkreports-addition |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pitt (community) | Approve | ||
Review via email: mp+63819@code.launchpad.net |
Description of the change
This branch adds a new exit state for apport-checkreports (that is the helper that update-notifier is using). If apport is globally disabled but there are reports it now exits with status 2 and prints a message. This will make update-notifier not call the apport GUI is apport is disabled but there are reports comming in. It also moves the enabled() test into apport.fileutils
In addition to that I would like to add a new script apport-is-enabled that just returns 0/1. That I will then call in apt/aptdaemon to check that reports are actually enabled. Alternatively we could add a additional apport-checkreports --is-apport-enabled call if the additional binary is not wanted.
There is already apport. packaging. enabled( ), so no need to redefine it again in fileutils.
The new exit status is fine for me, I'll merge that.
A new script apport-is-enabled also sounds ok to me, but I'd write it in dash, not python; calling a full python interpreter from dpkg/apt not only sounds very expensive to just check a single file, but also is prone to failures if the very thing we are reporting are failed packages.