Package: debconf
Version: 1.5.10
Severity: wishlist

Hi,

Most of debconf notes are annoying as they are not related with
package configuration and force the user to press enter many times
during the installation. As a few debconf notes are still mandatory to
have a working system, I suggest to add a configuration option to allow
the user to choose whether he/she wants to see these usage notes,
displaying only critical notes otherwise.

The attached patch is probably very incomplete, I prefer to have
some feedback on the idea before working too much on it.

Cheers,

-- 
Thomas Huriaux
Index: debian/config
===================================================================
--- debian/config	(revision 2177)
+++ debian/config	(working copy)
@@ -17,5 +17,6 @@
 db_beginblock
 db_input medium debconf/frontend || true
 db_input medium debconf/priority || true
+db_input medium debconf/usage-notes || true
 db_endblock
 db_go || true
Index: debian/templates
===================================================================
--- debian/templates	(revision 2177)
+++ debian/templates	(working copy)
@@ -30,6 +30,19 @@
  Note that no matter what level you pick here, you will be able to see
  every question if you reconfigure a package with dpkg-reconfigure.
 
+Template: debconf/usage-notes
+Type: boolean
+Default: false
+_Description: Display usage notes?
+ Some packages may contain usage notes that are displayed during the
+ installation process.
+ .
+ As they are mainly of no use for the configuration of the packages,
+ the default is to not display them.
+ .
+ You should however read the README.Debian file of every package you
+ install to check if important usage information is available.
+
 Template: debconf-apt-progress/title
 Type: text
 _Description: Installing packages
Index: Debconf/Config.pm
===================================================================
--- Debconf/Config.pm	(revision 2177)
+++ Debconf/Config.pm	(working copy)
@@ -322,6 +322,21 @@
 	return $ret;
 }
 
+=item display_usage_notes
+
+Whether to display usage notes.
+
+=cut
+
+sub display_usage_notes {
+	my $class=shift;
+	my $question=Debconf::Question->get('debconf/usage-notes');
+	if ($question) {
+		return 1 if ($question->value eq "true");
+	}
+	return 0;
+}
+
 =item terse
 
 The behavior in terse mode varies by frontend. Changes to terse mode are
Index: Debconf/ConfModule.pm
===================================================================
--- Debconf/ConfModule.pm	(revision 2177)
+++ Debconf/ConfModule.pm	(working copy)
@@ -317,6 +317,9 @@
 	if ($question->type ne 'error') {
 		# Don't show items that are unimportant.
 		$visible='' unless high_enough($priority);
+		if ($question->type =~ /^(note|text)$/) {
+			$visible='' unless (($priority eq 'critical') or Debconf::Config::display_usage_notes());
+		}
 
 		# Don't re-show already seen questions, unless reconfiguring.
 		$visible='' if ! Debconf::Config->reshow &&

Attachment: signature.asc
Description: Digital signature

Reply via email to