[PATCH] Stop configuring a driver on sparc
* xserver-xorg.postinst: drop the code to pick a driver on sparc. The
server now autoconfigures sbus devices.
* As a result of the previous change, remove the
xserver-xorg/config/device/driver debconf template, and unregister it on
upgrade.
---
debian/changelog | 5 ++
debian/xserver-xorg.postinst.in | 126 +-------------------------------------
debian/xserver-xorg.templates | 10 ---
3 files changed, 9 insertions(+), 132 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index a7adc76..0844a4e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,11 @@ xorg (1:7.4~6) UNRELEASED; urgency=low
* xserver-xorg.postinst: drop duplicate definitions of the debug_echo and
validate_string_db_input shell functions.
* dexconf: don't try to get the driver from debconf.
+ * xserver-xorg.postinst: drop the code to pick a driver on sparc. The
+ server now autoconfigures sbus devices.
+ * As a result of the previous change, remove the
+ xserver-xorg/config/device/driver debconf template, and unregister it on
+ upgrade.
-- Timo Aaltonen <tjaalton@ubuntu.com> Fri, 23 Jan 2009 14:53:45 +0200
diff --git a/debian/xserver-xorg.postinst.in b/debian/xserver-xorg.postinst.in
index 7b540b7..484e4ec 100644
--- a/debian/xserver-xorg.postinst.in
+++ b/debian/xserver-xorg.postinst.in
@@ -51,10 +51,6 @@ XORGCONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XORGCONFIG##*/}.md5sum"
XORGCONFIG_ROSTER="$CONFIG_AUX_DIR/${XORGCONFIG##*/}.roster"
THIS_SERVER=/usr/bin/Xorg
-NCARDS=0
-NSERVERS=0
-NDRIVERS=0
-DRIVERS_LIST=
MULTIHEAD=
# get machine architecture
@@ -65,89 +61,6 @@ debug_report_status () {
debug_echo "$1 exited with status $2"
}
-discover_sparc_video () {
- # Detect video cards on sparc by parsing prtconf output
- prtconf -p -v | awk '
- BEGIN {
- display_node = 0;
- model = "";
- name = "";
- }
- /Node/ {
- if(display_node == 1) {
- printf "model=\"%s\" name=\"%s\"\n", model, name
- display_node = 0;
- };
- model = "";
- name = ""
- }
- /device_type:/ {
- if(index($2, "display") != 0) {
- display_node = 1
- }
- }
- /model:/ { l=length($2); model = substr($2, 2, l-2) }
- /name:/ { l=length($2); name = substr($2, 2, l-2) }
- END{
- if(display_node == 1) {
- printf "model=\"%s\" name=\"%s\"\n", model, name
- };
- }' | \
- while read line
- do
- eval "${line}"
-# Match the name and the model to the driver.
- test -z "${name}" && continue
-# The model stored in the prom is usually not too
-# informative, so that we need to provide some
-# sensible human-readable card identification as well.
- server='XFree86'
- case "${name}" in
- 'cgsix' )
- card='Sun CG6 framebuffer'
- driver='suncg6'
- ;;
- 'SUNW,sx' )
- card='Sun CG14 framebuffer'
- driver='suncg14'
- ;;
- 'SUNW,leo' )
- card='Sun LEO framebuffer'
- driver='sunleo'
- ;;
- 'SUNW,tcx' )
- card='Sun TCX framebuffer'
- driver='suntcx'
- ;;
- 'SUNW,m64B' )
- card='ATI Technologies 3D Rage Pro or similar'
- driver='ati'
- ;;
- 'SUNW,ffb' )
- card='Sun Creator3D framebuffer or similar'
- driver='sunffb'
- ;;
- 'SUNW,afb' )
- card='Sun Elite3D framebuffer or similar'
- driver='sunffb'
- ;;
- 'TSI,gfxp' )
- card='PGX32 framebuffer or similar'
- driver='glint'
- ;;
- * )
- card='Unknown'
- server='unknown'
- driver='unknown'
- ;;
- esac
- if [ -n "${model}" ]; then
- card="${card} (${model})"
- fi
- printf "${card}\t${server}\t${driver}\n"
- done
-}
-
validate_string_db_input () {
# Syntax: validate_string_db_input priority template
#
@@ -463,41 +376,6 @@ fi
debug_echo "Configuring $THIS_PACKAGE."
-# collect information about installed video card(s), if possible
-if [ "$ARCH" = "sparc" ]; then
- DISCOVER_PROG='prtconf'
- DISCOVER_FUNC='discover_sparc_video'
-
- if which $DISCOVER_PROG > /dev/null 2>&1; then
- DISCOVERED_VIDEO=$($DISCOVER_FUNC)
- MULTIHEAD=$(echo "$DISCOVERED_VIDEO" | wc -l)
- if [ -n "$DISCOVERED_VIDEO" ]; then
- NCARDS=$(echo "$DISCOVERED_VIDEO" | wc -l)
- SERVERS=$(echo "$DISCOVERED_VIDEO" | awk 'BEGIN { FS="\t" } {print $2}' | grep -v unknown | sort | uniq)
- if [ -n "$SERVERS" ]; then
- NSERVERS=$(echo "$SERVERS" | wc -l)
- fi
- DRIVERS=$(echo "$DISCOVERED_VIDEO" | awk 'BEGIN { FS="\t" } {print $NF}' | grep -v unknown | sort | uniq)
- if [ -n "$DRIVERS" ]; then
- NDRIVERS=$(echo "$DRIVERS" | wc -l)
- DRIVERS_LIST=$(echo "$DRIVERS" | awk 'BEGIN {ORS="";FS="\t"} {if(NR > 1){print last ","};last=$0} END {print last}')
- fi
- if [ $MULTIHEAD -gt 1 ]; then
- MULTIHEAD=yes
- fi
- DISCOVERED_VIDEO=$(echo "$DRIVERS" | head -n 1)
- else
- DISCOVERED_VIDEO=""
- fi
- else
- DISCOVERED_VIDEO=""
- fi
-else
- DISCOVERED_VIDEO=""
-fi
-db_subst xserver-xorg/config/device/driver choices "$DRIVERS_LIST"
-auto_answer db_input low xserver-xorg/config/device/driver "$DISCOVERED_VIDEO"
-
if [ -n "$FIRSTINST" ] || [ -n "$RECONFIGURE" ]; then
# BusID
PRIORITY=low
@@ -867,6 +745,10 @@ if [ -n "$UPGRADE" ] && dpkg --compare-versions "$2" le "1:7.3+5"; then
done
fi
+if [ -n "$UPGRADE" ] && dpkg --compare-versions "$2" lt 1:7.4+6; then
+ db_unregister xserver-xorg/config/device/driver || true
+fi
+
# no debconf interaction should be done after this point
# (the dexconf call below invokes db_stop)
diff --git a/debian/xserver-xorg.templates b/debian/xserver-xorg.templates
index 098824e..6701c29 100644
--- a/debian/xserver-xorg.templates
+++ b/debian/xserver-xorg.templates
@@ -4,16 +4,6 @@
# Please consider interacting with the team if you intend
# to modify the templates or add new templates
-Template: xserver-xorg/config/device/driver
-Type: select
-Choices: ${choices}
-_Description: X server driver:
- For the X Window System graphical user interface to operate correctly, it is
- necessary to select a video card driver for the X server.
- .
- Drivers are typically named for the video card or chipset manufacturer, or
- for a specific model or family of chipsets.
-
Template: xserver-xorg/config/device/use_fbdev
Type: boolean
_Description: Use kernel framebuffer device interface?
--
1.5.6.5
Reply to: