[Pkg-fglrx-devel] r911 - fglrx-driver/trunk/debian

Andreas Beckmann anbe-guest at alioth.debian.org
Mon Jun 4 08:38:07 UTC 2012


Author: anbe-guest
Date: 2012-06-04 08:38:06 +0000 (Mon, 04 Jun 2012)
New Revision: 911

Added:
   fglrx-driver/trunk/debian/libfglrx.preinst
Modified:
   fglrx-driver/trunk/debian/changelog
   fglrx-driver/trunk/debian/control
Log:
add libfglrx.preinst check for unsupported GPUs and abort installation

Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog	2012-06-04 07:31:00 UTC (rev 910)
+++ fglrx-driver/trunk/debian/changelog	2012-06-04 08:38:06 UTC (rev 911)
@@ -2,6 +2,9 @@
 
   * bug-script: Include output from glx-alternative-fglrx bug-script
     (information about alternatives and diversions).
+  * libfglrx.preinst: Check for no longer supported GPUs based on R6xx/R7xx
+    and abort installation if found. FIXME: use debconf
+    Add Pre-Depends: pciutils.
 
  -- Andreas Beckmann <debian at abeckmann.de>  Mon, 04 Jun 2012 09:25:36 +0200
 

Modified: fglrx-driver/trunk/debian/control
===================================================================
--- fglrx-driver/trunk/debian/control	2012-06-04 07:31:00 UTC (rev 910)
+++ fglrx-driver/trunk/debian/control	2012-06-04 08:38:06 UTC (rev 911)
@@ -80,6 +80,7 @@
 Architecture: i386 amd64
 Multi-Arch: same
 Pre-Depends:
+ pciutils,
  ${misc:Pre-Depends},
 Depends:
  ${shlibs:Depends},

Added: fglrx-driver/trunk/debian/libfglrx.preinst
===================================================================
--- fglrx-driver/trunk/debian/libfglrx.preinst	                        (rev 0)
+++ fglrx-driver/trunk/debian/libfglrx.preinst	2012-06-04 08:38:06 UTC (rev 911)
@@ -0,0 +1,179 @@
+#!/bin/sh
+set -e
+
+UNSUPPORTED_PCIIDS="
+10029400
+10029401
+10029402
+10029403
+10029405
+1002940A
+1002940B
+1002940F
+10029440
+10029441
+10029442
+10029443
+10029444
+10029446
+10029447
+1002944A
+1002944B
+1002944C
+1002944E
+1002944F
+10029450
+10029451
+10029452
+10029456
+1002945A
+1002945B
+1002945E
+10029460
+10029462
+1002946A
+1002946B
+1002947A
+1002947B
+10029480
+10029487
+10029488
+10029489
+1002948A
+1002948F
+10029490
+10029491
+10029495
+10029498
+1002949C
+1002949E
+1002949F
+100294A0
+100294A1
+100294A3
+100294B1
+100294B3
+100294B4
+100294B5
+100294C0
+100294C1
+100294C3
+100294C4
+100294C5
+100294C6
+100294C7
+100294C8
+100294C9
+100294CB
+100294CC
+10029500
+10029501
+10029504
+10029505
+10029506
+10029507
+10029508
+10029509
+1002950F
+10029511
+10029513
+10029515
+10029517
+10029519
+10029540
+10029541
+10029542
+1002954E
+1002954F
+10029552
+10029553
+10029555
+10029557
+1002955F
+10029580
+10029581
+10029583
+10029586
+10029587
+10029588
+10029589
+1002958A
+1002958B
+1002958C
+1002958D
+1002958E
+1002958F
+10029590
+10029591
+10029593
+10029595
+10029596
+10029597
+10029598
+10029599
+1002959B
+100295C0
+100295C2
+100295C4
+100295C5
+100295C6
+100295C7
+100295C9
+100295CC
+100295CD
+100295CE
+100295CF
+10029610
+10029611
+10029612
+10029613
+10029614
+10029615
+10029616
+10029710
+10029711
+10029712
+10029713
+10029714
+10029715
+"
+
+find_unsupported_gpus()
+{
+	# Check for R6xx, R7xx, ... GPUs that are no longer supported starting with 12-6
+	if lspci --version > /dev/null 2>&1; then
+		lspci -mn \
+		| awk '{ gsub("\"",""); if ($2 == "0300") { print $1 " " $3$4 } }' \
+		| while read dev id
+		do
+			for x in $UNSUPPORTED_PCIIDS
+			do
+				if [ "$x" = "$id" ]; then
+					echo "$dev"
+					break
+				fi
+			done
+		done
+	fi
+}
+
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+
+	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
+		exit 1
+	fi
+
+fi
+
+




More information about the Pkg-fglrx-devel mailing list