Package: xserver-xorg
Version: 6.8.2.dfsg.1-11
Severity: important
Tags: d-i, patch

I've been working on d-i's new first-stage package selection component.
If you aren't familiar with it, this is one of the last pieces in our
quest to get rid of base-config and do everything in a single-stage
install: it installs packages in the target system using the debconf
passthrough frontend, which allows the installer's cdebconf frontend to
be used to display questions. It took me a while to verify that this
wasn't a bug in this setup, but I mention this because it's possible
that you may not be able to reproduce the exact same effects of the bug
in a normal system.

The video mode question (xserver-xorg/config/display/modes) appears
quite badly corrupted, with blank lines in between each valid choice;
furthermore, no matter whether I select other modes, only 640x480 is
ever actually written to xorg.conf. I got a DEBCONF_DEBUG=developer
trace, and the relevant portion is:

  debconf (developer): starting /var/lib/dpkg/info/xserver-xorg.postinst 
configure
  [...]
  debconf (developer): <-- METAGET xserver-xorg/config/display/modes choices
  debconf (developer): --> 0
  debconf (developer): <-- SUBST xserver-xorg/config/display/modes choices 
1920x1440,, 1920x1200,, 1856x1392,, 1792x1344,, 1680x1050,, 1600x1200,, 
1440x900,, 1400x1050,, 1280x1024,, 1280x960,, 1280x854,, 1280x800,, 1280x768,, 
1200x800,, 1152x864,, 1152x768,, 1024x768,, 800x600,, 640x480
  debconf (developer): --> 0

This corresponds to the following code in xserver-xorg.postinst:

  db_metaget xserver-xorg/config/display/modes choices
  if [ -n "$RET" ]; then
    DCRESOLUTIONS="$RET"
    DCRESOLUTIONS=$(echo $DCRESOLUTIONS | sed -e 's/, / /g')
  else
    DCRESOLUTIONS="1920x1440, 1920x1200, 1856x1392, 1792x1344, 1680x1050, 
1600x1200, 1440x900, 1400x1050, 1280x1024, 1280x960, 1280x854, 1280x800, 
1280x768, 1200x800, 1152x864, 1152x768, 1024x768, 800x600, 640x480"
  fi
  if [ -n "$RESOLUTIONS" ]; then
    DCRESOLUTIONS=$(for i in $DCRESOLUTIONS $RESOLUTIONS; do echo $i; done | 
sort -unr)
  fi
  # set the old choice + the probed ones (if any).
  DCRESOLUTIONS=$(echo $DCRESOLUTIONS | sed -e 's/ /, /g')
  db_subst xserver-xorg/config/display/modes choices "$DCRESOLUTIONS"

Note how the true branch of the first if makes sure that $DCRESOLUTIONS
doesn't contain commas between the choices, but the false branch
doesn't. This causes the doubled commas in the trace above, which in
turn confuses cdebconf into (a) displaying the blank lines I mentioned
earlier and (b) only considering 640x480 (the only choice without an
extra comma attached to it) as a valid choice.

The following patch should clear this up. Since this affects new
installations quite badly, could you please include this in your next
upload as soon as possible so that we can include it in d-i etch beta 2?

diff -ru xorg-x11-6.8.2.dfsg.1.orig/debian/xserver-xorg.postinst.in 
xorg-x11-6.8.2.dfsg.1/debian/xserver-xorg.postinst.in
--- xorg-x11-6.8.2.dfsg.1.orig/debian/xserver-xorg.postinst.in  2005-12-26 
10:16:58.258819431 +0000
+++ xorg-x11-6.8.2.dfsg.1/debian/xserver-xorg.postinst.in       2005-12-26 
10:14:50.000000000 +0000
@@ -392,10 +392,10 @@
   db_metaget xserver-xorg/config/display/modes choices
   if [ -n "$RET" ]; then
     DCRESOLUTIONS="$RET"
-    DCRESOLUTIONS=$(echo $DCRESOLUTIONS | sed -e 's/, / /g')
   else
     [EMAIL PROTECTED]@
   fi
+  DCRESOLUTIONS=$(echo $DCRESOLUTIONS | sed -e 's/, / /g')
   if [ -n "$RESOLUTIONS" ]; then
     DCRESOLUTIONS=$(for i in $DCRESOLUTIONS $RESOLUTIONS; do echo $i; done | 
sort -unr)
   fi

Thanks,

-- 
Colin Watson                                       [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to