[Pkg-fglrx-devel] r940 - in fglrx-driver/trunk/debian: . po

Andreas Beckmann anbe-guest at alioth.debian.org
Sat Jun 30 18:31:49 UTC 2012


Author: anbe-guest
Date: 2012-06-30 18:31:48 +0000 (Sat, 30 Jun 2012)
New Revision: 940

Added:
   fglrx-driver/trunk/debian/fglrx-driver.config
   fglrx-driver/trunk/debian/fglrx-driver.templates
Modified:
   fglrx-driver/trunk/debian/changelog
   fglrx-driver/trunk/debian/fglrx-driver.postinst
   fglrx-driver/trunk/debian/fglrx-driver.postrm
   fglrx-driver/trunk/debian/po/POTFILES.in
Log:
Redo "use debconf to warn in postinst"

Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog	2012-06-30 18:29:50 UTC (rev 939)
+++ fglrx-driver/trunk/debian/changelog	2012-06-30 18:31:48 UTC (rev 940)
@@ -7,6 +7,10 @@
   * libfglrx.preinst: Check for no longer supported GPUs based on R6xx/R7xx
     and ask (with debconf) whether to install the driver anyway.
     Add Pre-Depends: debconf, pciutils.
+  * fglrx-driver.{config,postinst}: Present a debconf note about needing
+    manual Xorg configuration to enable the fglrx driver.
+  * fglrx-driver.postrm: Present a debconf note if the driver was removed, but
+    it is still enabled in xorg.conf(.d/).
   * control, rules: Add debconf infrastructure.
 
  -- Andreas Beckmann <debian at abeckmann.de>  Sat, 30 Jun 2012 20:03:53 +0200

Copied: fglrx-driver/trunk/debian/fglrx-driver.config (from rev 925, fglrx-driver/trunk/debian/fglrx-driver.config)
===================================================================
--- fglrx-driver/trunk/debian/fglrx-driver.config	                        (rev 0)
+++ fglrx-driver/trunk/debian/fglrx-driver.config	2012-06-30 18:31:48 UTC (rev 940)
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+
+if ! grep -q fglrx /etc/X11/xorg.conf /etc/X11/xorg.conf.d/*.conf 2>/dev/null; then
+	db_input high fglrx-driver/needs-xorg-conf-to-enable || true
+	db_go
+fi

Modified: fglrx-driver/trunk/debian/fglrx-driver.postinst
===================================================================
--- fglrx-driver/trunk/debian/fglrx-driver.postinst	2012-06-30 18:29:50 UTC (rev 939)
+++ fglrx-driver/trunk/debian/fglrx-driver.postinst	2012-06-30 18:31:48 UTC (rev 940)
@@ -1,6 +1,8 @@
 #!/bin/sh
 set -e
 
+. /usr/share/debconf/confmodule
+
 if [ "$1" = "configure" ]; then
 
 	if [ -f /usr/lib/fglrx/diversions/libdri.so ]; then
@@ -8,16 +10,6 @@
 	fi
 	rmdir /usr/lib/fglrx/diversions 2>/dev/null || true
 
-	if ! grep -q fglrx /etc/X11/xorg.conf /etc/X11/xorg.conf.d/*.conf 2>/dev/null; then
-		echo "**********************************************"
-		echo "NOTE: the fglrx driver is not yet configured."
-		echo "Please consider /usr/bin/aticonfig to create a"
-		echo "working xorg.conf configuration."
-		echo "For example, 'sudo aticonfig --initial' should"
-		echo "be sufficient for most use cases."
-		echo "**********************************************"
-	fi
-
 fi
 
 #DEBHELPER#

Modified: fglrx-driver/trunk/debian/fglrx-driver.postrm
===================================================================
--- fglrx-driver/trunk/debian/fglrx-driver.postrm	2012-06-30 18:29:50 UTC (rev 939)
+++ fglrx-driver/trunk/debian/fglrx-driver.postrm	2012-06-30 18:31:48 UTC (rev 940)
@@ -1,6 +1,31 @@
 #!/bin/sh
 set -e
 
+. /usr/share/debconf/confmodule
+
+warn_about_remaining_xorg_configuration()
+{
+	# allow to disable the check via preseeding
+	db_get fglrx-driver/check-xorg-conf-on-removal
+	test "$RET" = "true" || return 0
+
+	XORG_CONF=$(grep -l '^[^#]*fglrx' /etc/X11/xorg.conf /etc/X11/xorg.conf.d/*.conf 2>/dev/null || true)
+
+	test -n "$XORG_CONF" || return 0
+
+	db_subst fglrx-driver/removed-but-enabled-in-xorg-conf config-files "$XORG_CONF"
+	db_fset fglrx-driver/removed-but-enabled-in-xorg-conf seen false
+	db_input high fglrx-driver/removed-but-enabled-in-xorg-conf || true
+	db_go
+
+}
+
+if [ "$1" = "remove" ]; then
+
+	warn_about_remaining_xorg_configuration
+
+fi
+
 if [ "$1" = "purge" ]; then
 
 	if [ -f /etc/ati/amdpcsdb ]; then

Copied: fglrx-driver/trunk/debian/fglrx-driver.templates (from rev 925, fglrx-driver/trunk/debian/fglrx-driver.templates)
===================================================================
--- fglrx-driver/trunk/debian/fglrx-driver.templates	                        (rev 0)
+++ fglrx-driver/trunk/debian/fglrx-driver.templates	2012-06-30 18:31:48 UTC (rev 940)
@@ -0,0 +1,28 @@
+Template: fglrx-driver/needs-xorg-conf-to-enable
+Type: note
+_Description: Manual configuration required to enable fglrx driver
+ The fglrx driver is not yet configured.
+ Please consider /usr/bin/aticonfig to create a
+ working xorg.conf configuration.
+ For example, 'sudo aticonfig --initial' should
+ be sufficient for most use cases.
+
+Template: fglrx-driver/check-xorg-conf-on-removal
+Type: boolean
+Default: true
+Description: for internal use
+ Can be preseeded.  If set to false, does not warn about fglrx still being
+ enabled in xorg.conf(.d/) when removing the package.
+
+Template: fglrx-driver/removed-but-enabled-in-xorg-conf
+Type: note
+#flag:translate!:3
+_Description: Fglrx driver is still enabled in xorg.conf
+ The fglrx driver was just removed, but it is still enabled in the
+ Xorg configuration. X cannot be (re-)started successfully until fglrx
+ is disabled in the following config file(s):
+ .
+ ${config-files}
+ .
+ Note that switching to the free Radeon driver requires the fglrx-driver
+ package to be purged (not just removed).

Modified: fglrx-driver/trunk/debian/po/POTFILES.in
===================================================================
--- fglrx-driver/trunk/debian/po/POTFILES.in	2012-06-30 18:29:50 UTC (rev 939)
+++ fglrx-driver/trunk/debian/po/POTFILES.in	2012-06-30 18:31:48 UTC (rev 940)
@@ -1 +1,2 @@
 [type: gettext/rfc822deb] libfglrx.templates
+[type: gettext/rfc822deb] fglrx-driver.templates




More information about the Pkg-fglrx-devel mailing list