Author: dnusinow
Date: 2006-09-19 21:55:01 -0400 (Tue, 19 Sep 2006)
New Revision: 3377

Modified:
   trunk/debian/xorg/debian/changelog
   trunk/debian/xorg/debian/xserver-xorg.postinst.in
Log:
* Don't force people to select resolution modes. Previously, if none were
  selected, a loop would be entered until some were. This turned out to be
  buggy, but it should not be in place anyway. I've removed the loop, so
  that if the user selects no modes, dexconf won't write the section to
  xorg.conf and the server will be left to its own nefarious devices. Thanks
  Robert Millan. (closes: #384285)

Modified: trunk/debian/xorg/debian/changelog
===================================================================
--- trunk/debian/xorg/debian/changelog  2006-09-20 00:33:54 UTC (rev 3376)
+++ trunk/debian/xorg/debian/changelog  2006-09-20 01:55:01 UTC (rev 3377)
@@ -47,6 +47,12 @@
     by Fabio.
   * Steal patch from Ubuntu to recreate missing server symlink checksum that
     was lost on some upgrades. This patch by Fabio.
+  * Don't force people to select resolution modes. Previously, if none were
+    selected, a loop would be entered until some were. This turned out to be
+    buggy, but it should not be in place anyway. I've removed the loop, so
+    that if the user selects no modes, dexconf won't write the section to
+    xorg.conf and the server will be left to its own nefarious devices. Thanks
+    Robert Millan. (closes: #384285)
 
   [ David Martínez Moreno ]
   * Update Spanish debconf translation.
@@ -64,7 +70,7 @@
     wouldn't match anything, because the epoch is not part of the upstream
     version number.  Thanks to Thomas Lange for diagnosing this bug!
 
- -- David Nusinow <[EMAIL PROTECTED]>  Tue, 19 Sep 2006 20:32:55 -0400
+ -- David Nusinow <[EMAIL PROTECTED]>  Tue, 19 Sep 2006 21:49:20 -0400
 
 xorg (1:7.1.0~1) experimental; urgency=low
 

Modified: trunk/debian/xorg/debian/xserver-xorg.postinst.in
===================================================================
--- trunk/debian/xorg/debian/xserver-xorg.postinst.in   2006-09-20 00:33:54 UTC 
(rev 3376)
+++ trunk/debian/xorg/debian/xserver-xorg.postinst.in   2006-09-20 01:55:01 UTC 
(rev 3377)
@@ -413,38 +413,28 @@
       # if we are here we did not detect the frequencies, but we have the 
resolution.
       # get the highest resolution.
       db_get xserver-xorg/config/display/modes || debug_echo "db_get 
xserver-xorg/config/display/modes"
-      if [ -z "$RET" ]; then
-        _ok=""
-        while [ ! "$ok" ]; do
-          db_input $PRIORITY xserver-xorg/config/display/modes || debug_echo 
"db_input $PRIORITY xserver-xorg/config/display/modes"
-          if [ $? -eq 30 ]; then
-            _ok="yes"
-          else
-            db_go || true
-            db_get xserver-xorg/config/display/modes
-            if [ "$RET" ]; then
-              _ok="yes"
-            fi
-          fi
-        done
+      if [ -n "$RET" ]; then
+        # Only do this if the user selects at least one mode to write to the 
+        # conf file. If not, then the section won't be written by dexconf
+        # and the server will pick the highest mode it can figure out
+        MAXRES="$(echo $RET | sed -e 's/,//g')"
+        MAXRES="$(for i in $MAXRES; do echo $i; done | sort -t x -k1,1nr 
-k2,2nr -u | head -n 1)"
+        # set a sane default for mode-list
+        MAXRES="$MAXRES @ 60Hz"
+        db_set xserver-xorg/config/monitor/mode-list "$MAXRES"
+        # apparently all the known resolution/horiz-sync combinantion have a 
ratio that
+        # can go from 19 to 21. Only one exception was 18. We can safely 
assume a ratio of 20
+        # for default setup. DDC should do the rest.
+        HMAX=$(echo "$MAXRES" | cut -d "x" -f 1)
+        HMAX=$(expr "$HMAX" / 20)
+        # set sane defaults as fallback, in case there is no mode-list match 
otherwise we
+        # prefer a well known match.
+        HORIZ_SYNC="28-$HMAX"
+        VERT_REFRESH="43-60"
+        db_set xserver-xorg/config/monitor/horiz-sync "$HORIZ_SYNC"
+        db_set xserver-xorg/config/monitor/vert-refresh "$VERT_REFRESH"
+        db_set xserver-xorg/config/monitor/selection-method "Advanced"
       fi
-      MAXRES="$(echo $RET | sed -e 's/,//g')"
-      MAXRES="$(for i in $MAXRES; do echo $i; done | sort -t x -k1,1nr -k2,2nr 
-u | head -n 1)"
-      # set a sane default for mode-list
-      MAXRES="$MAXRES @ 60Hz"
-      db_set xserver-xorg/config/monitor/mode-list "$MAXRES"
-      # apparently all the known resolution/horiz-sync combinantion have a 
ratio that
-      # can go from 19 to 21. Only one exception was 18. We can safely assume 
a ratio of 20
-      # for default setup. DDC should do the rest.
-      HMAX=$(echo "$MAXRES" | cut -d "x" -f 1)
-      HMAX=$(expr "$HMAX" / 20)
-      # set sane defaults as fallback, in case there is no mode-list match 
otherwise we
-      # prefer a well known match.
-      HORIZ_SYNC="28-$HMAX"
-      VERT_REFRESH="43-60"
-      db_set xserver-xorg/config/monitor/horiz-sync "$HORIZ_SYNC"
-      db_set xserver-xorg/config/monitor/vert-refresh "$VERT_REFRESH"
-      db_set xserver-xorg/config/monitor/selection-method "Advanced"
     fi
   fi
 


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

Reply via email to