[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#388568: Acknowledgement (xserver-xorg: postinst can hang)



On Tue, Oct 03, 2006 at 06:44:53PM +0200, Wolfgang Pfeiffer wrote:
> > The easiest solution is to remove the debug_echo.  If it is needed for some
> > reason, a construct like this should be made (note that this happens in a set
> > +e block):
> 
> > db_input "$PRIORITY" "$TEMPLATE"
> > retval=$?
> > if [ $retval -ne 0 ] ; then debug_echo "v_s_d_i/db_input $PRIORITY $TEMPLATE"
> > ; fi
> > if [ $? -eq 30 ]; then
> 
> Thanks for finding the solution ... :)
> 
> But could you please post the diff for the postinst script (provided
> the code above is about this script) .. the snippets so far posted
> here do not seem being self-explaining very much to me ... :)

  db_input "$PRIORITY" "$TEMPLATE"
  if [ $? -eq 30 ]; then

The patch to fix 389506, 388568 and 386191 is attached.

Denis
Index: debian/xserver-xorg.config.in
===================================================================
--- debian/xserver-xorg.config.in	(révision 3516)
+++ debian/xserver-xorg.config.in	(copie de travail)
@@ -828,7 +828,7 @@
   fi
   if [ -z "$DEFAULT" ]; then
     # fall back to some language-specific generic text
-    db_get xserver-xorg/config/device/default-identifier
+    db_metaget xserver-xorg/config/device/default-identifier Description
     DEFAULT=$RET
   fi
   # this question requires input validation
@@ -988,7 +988,7 @@
 
   db_get debian-installer/keymap || debug_report_status "db_get debian-installer/keymap"
   DI_KEYMAP="${RET##mac-usb-}"
-  DI_KEYMAP="${DI_KEYMAP##-latin1}"
+  DI_KEYMAP="${DI_KEYMAP%%-latin1}"
 
   case "$DI_KEYMAP" in
     be2) XMAP="be";;
Index: debian/xserver-xorg.postinst.in
===================================================================
--- debian/xserver-xorg.postinst.in	(révision 3516)
+++ debian/xserver-xorg.postinst.in	(copie de travail)
@@ -55,7 +55,7 @@
   SAFE="$RET"
   set +e
   while :; do
-    db_input "$PRIORITY" "$TEMPLATE" || debug_echo "v_s_d_i/db_input $PRIORITY $TEMPLATE"
+    db_input "$PRIORITY" "$TEMPLATE"
     # is the question going to be asked?
     if [ $? -eq 30 ]; then
       break # no; bail out of validation loop
@@ -336,7 +336,7 @@
   # Set a sane monitor id default if probe fails
   if [ -z "$MONITOR_IDENTIFIER" ]; then
     # fall back to some language-specific generic text
-    db_get xserver-xorg/config/monitor/default-identifier
+    db_metaget xserver-xorg/config/monitor/default-identifier Description
     MONITOR_IDENTIFIER=$RET
   fi
   db_set xserver-xorg/config/monitor/identifier "$MONITOR_IDENTIFIER"

Reply to: