← Back to team overview

apport-hackers team mailing list archive

[Merge] lp:~ev/apport/drop-apport-noui into lp:apport

 

Evan Dandrea has proposed merging lp:~ev/apport/drop-apport-noui into lp:apport.

Requested reviews:
  Apport upstream developers (apport-hackers)

For more details, see:
https://code.launchpad.net/~ev/apport/drop-apport-noui/+merge/180824
-- 
https://code.launchpad.net/~ev/apport/drop-apport-noui/+merge/180824
Your team Apport upstream developers is requested to review the proposed merge of lp:~ev/apport/drop-apport-noui into lp:apport.
=== modified file 'NEWS'
--- NEWS	2013-08-02 14:02:44 +0000
+++ NEWS	2013-08-19 10:06:50 +0000
@@ -9,6 +9,9 @@
    don't have Contents.gz).
  * Robustify "progress bar visible" GTK and KDE UI checks for the faster
    collection due to dropping lsb_release.
+ * Drop apport-noui in favour of whoopsie-upload-all. We don't want to process
+   hooks when run noninteractively, since they may ask questions or determine a
+   report is not due to a bug in Ubuntu. whoopsie-upload-all skips these hooks.
 
 2.12 (2013-08-02)
 -----------------

=== modified file 'bin/apport-bug'
--- bin/apport-bug	2013-07-17 07:23:06 +0000
+++ bin/apport-bug	2013-08-19 10:06:50 +0000
@@ -30,7 +30,7 @@
     GTK="$RET"
     find_program "apport-kde"
     KDE="$RET"
-    find_program "apport-noui"
+    find_program "whoopsie-upload-all"
     AUTO="$RET"
 
     # find a terminal emulator
@@ -77,7 +77,7 @@
     fi
 
 else
-    echo "Neither apport-gtk, apport-kde, apport-cli, or apport-noui are installed. Install either to make this program work." >&2
+    echo "Neither apport-gtk, apport-kde, apport-cli, or whoopsie-upload-all are installed. Install either to make this program work." >&2
     exit 1
 fi
 

=== removed file 'data/apport-noui'
--- data/apport-noui	2013-07-15 13:16:49 +0000
+++ data/apport-noui	1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-#!/usr/bin/python
-
-'''Noninteractive reporting Apport user interface.'''
-
-# Copyright (C) 2013 Canonical Ltd.
-# Author: Evan Dandrea <evan.dandrea@xxxxxxxxxxxxx>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
-# the full text of the license.
-
-import apport
-import apport.ui
-
-
-class NoninteractiveUserInterface(apport.ui.UserInterface):
-    '''Noninteractive UserInterface.'''
-
-    #
-    # ui_* implementation of abstract UserInterface classes
-    #
-
-    def ui_present_report_details(self, allowed_to_report=True, modal_for=None):
-        return_value = {'report': True, 'blacklist': False,
-                        'restart': False, 'examine': False}
-        return return_value
-
-    def ui_info_message(self, title, text):
-        apport.log('Noninteractive reporting: %s: %s' % (title, text))
-
-    def ui_error_message(self, title, text):
-        apport.log('Noninteractive reporting: %s: %s' % (title, text))
-
-    def ui_start_upload_progress(self):
-        return
-
-    def ui_set_upload_progress(self, progress):
-        return
-
-    def ui_stop_upload_progress(self):
-        return
-
-    def ui_start_info_collection_progress(self):
-        return
-
-    def ui_pulse_info_collection_progress(self):
-        return
-
-    def ui_stop_info_collection_progress(self):
-        return
-
-    def ui_question_yesno(self, text):
-        '''Respond 'No' to any questions, as the user has not had the
-        opportunity to review the question.
-        '''
-        return False
-
-    def ui_question_choice(self, text, options, multiple):
-        '''Respond with no selection to any multiple choice questions, as the
-        user has not had the opportunity to review them.
-        '''
-        return None
-
-    def ui_question_file(self, text):
-        '''Show a file selector dialog.
-
-        Return path if the user selected a file, or None if cancelled.
-        '''
-        return None
-
-
-if __name__ == '__main__':
-    app = NoninteractiveUserInterface()
-    app.run_argv()