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

Bug#165591: debconf shenanigans



Package: xserver-xfree86
Version: 4.2.1-3

Summary:
Answering "no" to move_existing_nondebconf_config doesn't stop dexconf
from running, and the question is repeatedly asked on every
reinstall/upgrade of xserver-xfree86.


This should be pretty easy to reproduce; replace /etc/X11/XF86Config-4
with an empty file, dpkg-reconfigure xserver-xfree86, say "Yes" to
"Manage config with debconf" and "No" to "Replace existing config
file"; postinst will either write the file or fail (depending on what
random values happened to be in the debconf database), and "Replace
existing config file" will be asked again on the next
installation.

(The workaround is fairly obvious; dpkg-reconfigure xserver-xfree86
and say "no" to the first question)

The basic problem is that, in the config script, if the user replies
"no" to move_existing_nondebconf_config then the script aborts
immediately. However, this does not affect the postinst's behaviour;
it tries to create the file anyway.

My inclination is that config should db_set manage_config_with_debconf
to false if move_existing_nondebconf_config is false. Also, postinst
probably needs to check both values and do something appropriate in
the yes/no case.

FWIW, the output of 
/usr/share/debconf/frontend sh -x /var/lib/dpkg/info/xserver-xfree86.postinst configure
and
debconf-show xserver-xfree86
is attached, in the broken state.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ | Dept. of Computing,
 `. `'                          | Imperial College,
   `-             -><-          | London, UK
+ set -e
+ THIS_PACKAGE=xserver-xfree86
+ THIS_SCRIPT=postinst
+ SOURCE_VERSION=4.2.1-3
+ trap 'message;      message "Received signal.  Aborting xserver-xfree86 package postinst script.";      message;      exit 1' HUP INT QUIT TERM
+ which readlink
+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z '' ']'
++ exec
++ DEBCONF_REDIR=1
++ export DEBCONF_REDIR
++ _old_opts=configure
++ set -- capb CAPB
++ eval 'db_capb () {
		echo "CAPB $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- set SET
++ eval 'db_set () {
		echo "SET $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- reset RESET
++ eval 'db_reset () {
		echo "RESET $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- title TITLE
++ eval 'db_title () {
		echo "TITLE $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- input INPUT
++ eval 'db_input () {
		echo "INPUT $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- beginblock BEGINBLOCK
++ eval 'db_beginblock () {
		echo "BEGINBLOCK $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- endblock ENDBLOCK
++ eval 'db_endblock () {
		echo "ENDBLOCK $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- go GO
++ eval 'db_go () {
		echo "GO $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- get GET
++ eval 'db_get () {
		echo "GET $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- register REGISTER
++ eval 'db_register () {
		echo "REGISTER $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- unregister UNREGISTER
++ eval 'db_unregister () {
		echo "UNREGISTER $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- subst SUBST
++ eval 'db_subst () {
		echo "SUBST $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- previous_module PREVIOUS_MODULE
++ eval 'db_previous_module () {
		echo "PREVIOUS_MODULE $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- fset FSET
++ eval 'db_fset () {
		echo "FSET $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- fget FGET
++ eval 'db_fget () {
		echo "FGET $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- purge PURGE
++ eval 'db_purge () {
		echo "PURGE $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- metaget METAGET
++ eval 'db_metaget () {
		echo "METAGET $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- version VERSION
++ eval 'db_version () {
		echo "VERSION $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- clear CLEAR
++ eval 'db_clear () {
		echo "CLEAR $@" >&3
		# Set to newline to get whole line.
		local IFS='\''
'\''
		local _LINE
		read -r _LINE
		# Disgusting, but it'\''s the only good way to split the line,
		# preserving all other whitespace.
		RET=${_LINE#*[ 	]}
		return ${_LINE%%[ 	]*}
	      }'
++ set -- configure
++ unset _old_opts
+ THIS_SERVER=/usr/bin/X11/XFree86
+ CURRENT_SERVER=
+ '[' -e /etc/X11/X ']'
+ '[' -L /etc/X11/X ']'
++ readlink /etc/X11/X
+ CURRENT_SERVER=/usr/bin/X11/XFree86
+ '[' /usr/bin/X11/XFree86 = /usr/bin/X11/X -o /usr/bin/X11/XFree86 = /usr/X11R6/bin/X ']'
+ db_get shared/clobber_x-server_symlink
+ echo 'GET shared/clobber_x-server_symlink'
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET=false
+ return 0
+ '[' false = true ']'
+ db_set shared/clobber_x-server_symlink false
+ echo 'SET shared/clobber_x-server_symlink' false
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET=value set
+ return 0
+ '[' /usr/bin/X11/XFree86 = /usr/bin/X11/XFree86 ']'
+ db_get xserver-xfree86/manage_config_with_debconf
+ echo 'GET xserver-xfree86/manage_config_with_debconf'
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET=true
+ return 0
+ '[' true = true ']'
+ which dexconf
+ run_dexconf
+ dexconf
dexconf: cannot generate configuration file; 
xserver-xfree86/config/inputdevice/keyboard/rules not set.  Aborting.  
Reconfigure the X server with "dpkg-reconfigure xserver-xfree86" to correct 
this problem.
+ message 'Unable to write X server configuration file.'
+ echo 'Unable to write X server configuration file.'
+ fold -s -w 80
Unable to write X server configuration file.
+ db_set xserver-xfree86/move_existing_nondebconf_config false
+ echo 'SET xserver-xfree86/move_existing_nondebconf_config' false
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET=value set
+ return 0
+ db_fset xserver-xfree86/move_existing_nondebconf_config seen false
+ echo 'FSET xserver-xfree86/move_existing_nondebconf_config' seen false
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET=false
+ return 0
+ which update-configlets
+ exit 0
* xserver-xfree86/config/device/identifier: Matrox G400
* xserver-xfree86/config/monitor/screen-size: 17 inches (430 mm)
  xserver-xfree86/config/device/use_fbdev: 
* xserver-xfree86/config/monitor/selection-method: Advanced
  xserver-xfree86/config/doublequote_in_string_error: 
  shared/default-x-server: xserver-xfree86
* xserver-xfree86/config/inputdevice/mouse/emulate3buttons: false
  xserver-xfree86/config/device/bus_id: 
  xserver-xfree86/config/inputdevice/keyboard/layout: 
* xserver-xfree86/config/monitor/horiz-sync: 27-96
* xserver-xfree86/config/monitor/identifier: iiyama VM-PRO 410
  shared/no_known_x-server: 
  xserver-xfree86/autodetect_mouse: true
* xserver-xfree86/config/device/video_ram: 
  xserver-xfree86/config/monitor/mode-list: 1280x960 @ 60Hz
* xserver-xfree86/config/monitor/lcd: false
  xserver-xfree86/config/inputdevice/keyboard/internal: 
* xserver-xfree86/clobber_XF86Config-4: false
  xserver-xfree86/config/inputdevice/keyboard/rules: 
* xserver-xfree86/aware_XF86Config-4: 
  xserver-xfree86/multiple_possible_x-drivers: 
* xserver-xfree86/config/inputdevice/keyboard/model: pc102
  xserver-xfree86/config/write_dri_section: true
* xserver-xfree86/config/device/driver: mga
* xserver-xfree86/config/monitor/vert-refresh: 50-160
* xserver-xfree86/config/display/default_depth: 16
* xserver-xfree86/config/inputdevice/mouse/zaxismapping: false
* xserver-xfree86/config/display/modes: 1280x960, 1152x864, 1024x768, 800x600
  shared/clobber_x-server_symlink: false
  xserver-xfree86/config/inputdevice/mouse/retry_detection: 
  xserver-xfree86/config/device/bus_id_error: 
  xserver-xfree86/config/modules: GLcore, bitmap, dbe, ddc, dri, extmod, freetype, glx, int10, record, speedo, type1, vbe
  xserver-xfree86/config/inputdevice/keyboard/options: 
* xserver-xfree86/existing_XF86Config-4: No
  xserver-xfree86/move_existing_nondebconf_config: false
  xserver-xfree86/config/nonnumeric_string_error: 
* xserver-xfree86/config/inputdevice/mouse/protocol: PS/2
  shared/multiple_possible_x-servers: 
  xserver-xfree86/config/null_string_error: 
* xserver-xfree86/manage_config_with_debconf: true
  xserver-xfree86/config/monitor/range_input_error: 
  xserver-xfree86/autodetect_video_card: true
  xserver-xfree86/config/inputdevice/keyboard/variant: 
* xserver-xfree86/config/inputdevice/mouse/port: /dev/psaux
  xserver-xfree86/config/write_files_section: true
  xserver-xfree86/autodetect_monitor: true

Attachment: pgpcK9bdKUsNf.pgp
Description: PGP signature


Reply to: