----- Forwarded message from Joey Hess <[EMAIL PROTECTED]> -----

Date: Sun, 29 Oct 2006 23:56:12 -0500
From: Joey Hess <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], Colin Watson <[EMAIL PROTECTED]>
Subject: issue with noninteractive selects and debconf passhrough
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
        protocol="application/pgp-signature"; boundary="g7w8+K/95kPelPD2"
Content-Disposition: inline
User-Agent: Mutt/1.5.13 (2006-08-11)
Status: RO

#379198 turns out to be due to a bug in the passthrough frontend, when
used with debconf-apt-progress to install gdm. This happens:

debconf (developer): <-- METAGET shared/default-x-display-manager owners
debconf (developer): --> 0 gdm
debconf (developer): <-- METAGET shared/default-x-display-manager choices
debconf (developer): --> 0 
debconf (developer): <-- SUBST shared/default-x-display-manager choices gdm
debconf (developer): --> 0
debconf (developer): <-- FSET shared/default-x-display-manager seen false
debconf (developer): --> 0 false
debconf (developer): <-- INPUT high shared/default-x-display-manager
debconf (developer): Not displaying select list 
shared/default-x-display-manager with 1 choice
debconf (developer): --> 30 question skipped
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): <-- GET shared/default-x-display-manager
debconf (developer): --> 0

The noninteractive select list handling should make the value be the
first item on the list, "gdm", but this doesn't happen. So this bug
could affect more than gdm; the reported but never really tracked down
issues with wordlist selection questions could also be caused by this.

I came up with the attached patch, which I've tested to work, and which
seems to make perfect sense to me..

-- 
see shy jo



----- End forwarded message -----
-- 
see shy jo
Index: debian/changelog
===================================================================
--- debian/changelog    (revision 2162)
+++ debian/changelog    (working copy)
@@ -1,3 +1,11 @@
+debconf (1.5.8) UNRELEASED; urgency=low
+
+  * Fix passthrough frontend's handling of noninteractive elements.
+    Instead of duplicating the code in their show method, which varies for
+    some types (select), just call the show method.
+
+ -- Joey Hess <[EMAIL PROTECTED]>  Sun, 29 Oct 2006 23:43:14 -0500
+
 debconf (1.5.7) unstable; urgency=low
 
   [ Programs Translations ]
Index: Debconf/FrontEnd/Passthrough.pm
===================================================================
--- Debconf/FrontEnd/Passthrough.pm     (revision 2162)
+++ Debconf/FrontEnd/Passthrough.pm     (working copy)
@@ -286,9 +286,9 @@
                                debug developer => "Got \"$val\" for $tag";
                        }
                } else {
-                       my $default='';
-                       $default=$element->question->value if defined 
$element->question->value;
-                       $element->value($default);
+                       # "show" noninteractive elements, which don't need
+                       # to pass through, but may do something when shown.
+                       $element->show;
                }
        }
 

Attachment: signature.asc
Description: Digital signature

Reply via email to