[Pkg-fglrx-devel] r936 - in fglrx-driver/trunk/debian: . po
Andreas Beckmann
anbe-guest at alioth.debian.org
Sat Jun 30 18:25:55 UTC 2012
Author: anbe-guest
Date: 2012-06-30 18:25:55 +0000 (Sat, 30 Jun 2012)
New Revision: 936
Added:
fglrx-driver/trunk/debian/libfglrx.templates
fglrx-driver/trunk/debian/po/POTFILES.in
Modified:
fglrx-driver/trunk/debian/changelog
fglrx-driver/trunk/debian/control
fglrx-driver/trunk/debian/libfglrx.preinst
fglrx-driver/trunk/debian/rules
Log:
Redo "use debconf to ask about unsupported gpus in the system"
Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog 2012-06-30 18:23:06 UTC (rev 935)
+++ fglrx-driver/trunk/debian/changelog 2012-06-30 18:25:55 UTC (rev 936)
@@ -4,6 +4,10 @@
(Closes: #679038)
* libgl1-fglrx-glx [i386]: Provides new virtual package
libgl1-fglrx-glx-i386 which gets recommended by fglrx-driver [amd64].
+ * 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.
+ * control, rules: Add debconf infrastructure.
-- Andreas Beckmann <debian at abeckmann.de> Sat, 30 Jun 2012 20:03:53 +0200
Modified: fglrx-driver/trunk/debian/control
===================================================================
--- fglrx-driver/trunk/debian/control 2012-06-30 18:23:06 UTC (rev 935)
+++ fglrx-driver/trunk/debian/control 2012-06-30 18:25:55 UTC (rev 936)
@@ -24,6 +24,7 @@
automake,
rpl,
dkms (>= 2.1.1.1),
+ po-debconf,
Standards-Version: 3.9.3
Vcs-Svn: svn://svn.debian.org/svn/pkg-fglrx/fglrx-driver/trunk
Vcs-Browser: http://svn.debian.org/wsvn/pkg-fglrx/fglrx-driver/trunk/
@@ -81,6 +82,7 @@
Architecture: i386 amd64
Multi-Arch: same
Pre-Depends:
+ debconf (>= 0.5) | debconf-2.0,
pciutils,
${misc:Pre-Depends},
Depends:
Modified: fglrx-driver/trunk/debian/libfglrx.preinst
===================================================================
--- fglrx-driver/trunk/debian/libfglrx.preinst 2012-06-30 18:23:06 UTC (rev 935)
+++ fglrx-driver/trunk/debian/libfglrx.preinst 2012-06-30 18:25:55 UTC (rev 936)
@@ -1,6 +1,8 @@
#!/bin/sh
set -e
+. /usr/share/debconf/confmodule
+
UNSUPPORTED_PCIIDS="
10029400
10029401
@@ -158,22 +160,44 @@
}
-if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+check_for_unsupported_gpus()
+{
+ # allow to disable the check via preseeding
+ db_get fglrx-driver/check-for-unsupported-gpu
+ test "$RET" = "true" || return
UNSUPPORTED_DEVICES="$(find_unsupported_gpus)"
- # Warn about unsupported GPUs
- # FIXME: use debconf, ask "install anyway", default to "no" (= fail preinst)
- if [ -n "$UNSUPPORTED_DEVICES" ]; then
- echo "*** The following devices are present in the machine but are no longer"
- echo "*** supported by the fglrx driver:"
- for dev in $UNSUPPORTED_DEVICES
- do
- lspci -nn -s "$dev"
- done
+ test -n "$UNSUPPORTED_DEVICES" || return
+
+ UNSUPPORTED="$(for dev in $UNSUPPORTED_DEVICES ; do lspci -nn -s "$dev" ; done)"
+
+ db_subst fglrx-driver/install-even-if-unsupported-gpu-exists unsupported-gpus "$UNSUPPORTED"
+
+ # ensure the question is asked again unless it was accepted previously
+ db_get fglrx-driver/install-even-if-unsupported-gpu-exists
+ if [ "$RET" = "false" ]; then
+ db_fset fglrx-driver/install-even-if-unsupported-gpu-exists seen false
+ fi
+
+ db_input high fglrx-driver/install-even-if-unsupported-gpu-exists || true
+ db_go
+
+ echo "*** The following unsupported devices are present in the machine:"
+ echo "$UNSUPPORTED"
+
+ db_get fglrx-driver/install-even-if-unsupported-gpu-exists
+ if [ "$RET" = "false" ]; then
+ echo "Aborting fglrx installation."
exit 1
fi
+}
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+
+ check_for_unsupported_gpus
+
fi
-
+#DEBHELPER#
Copied: fglrx-driver/trunk/debian/libfglrx.templates (from rev 929, fglrx-driver/trunk/debian/libfglrx.templates)
===================================================================
--- fglrx-driver/trunk/debian/libfglrx.templates (rev 0)
+++ fglrx-driver/trunk/debian/libfglrx.templates 2012-06-30 18:25:55 UTC (rev 936)
@@ -0,0 +1,19 @@
+Template: fglrx-driver/check-for-unsupported-gpu
+Type: boolean
+Default: true
+Description: for internal use
+ Can be preseeded. If set to false, disables the check for no longer
+ supported GPUs based on R6XX/R7XX.
+
+Template: fglrx-driver/install-even-if-unsupported-gpu-exists
+Type: boolean
+Default: false
+#flag:translate!:3
+_Description: Install the fglrx driver anyway?
+ The following GPUs were found in your system but are no longer supported
+ by the fglrx driver:
+ .
+ ${unsupported-gpus}
+ .
+ You should use the free radeon driver (package: xserver-xorg-video-radeon)
+ for this GPU, but you may install fglrx anyway, even if it won't work.
Copied: fglrx-driver/trunk/debian/po/POTFILES.in (from rev 929, fglrx-driver/trunk/debian/po/POTFILES.in)
===================================================================
--- fglrx-driver/trunk/debian/po/POTFILES.in (rev 0)
+++ fglrx-driver/trunk/debian/po/POTFILES.in 2012-06-30 18:25:55 UTC (rev 936)
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] libfglrx.templates
Modified: fglrx-driver/trunk/debian/rules
===================================================================
--- fglrx-driver/trunk/debian/rules 2012-06-30 18:23:06 UTC (rev 935)
+++ fglrx-driver/trunk/debian/rules 2012-06-30 18:25:55 UTC (rev 936)
@@ -43,6 +43,7 @@
rm -f debian/shlibs.local
rm -f arch/x86/usr/X11R6/lib/AMDXvBAx86.cap
rm -f arch/x86_64/usr/X11R6/lib64/AMDXvBAx64.cap
+ debconf-updatepo
# Reformat the LICENSE to the format needed for debian/copyright.
LICENSE.txt: LICENSE.TXT
More information about the Pkg-fglrx-devel
mailing list