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

Bug#884606: marked as done (stretch-pu: package espeakup/1:0.80-5+b2)



Your message dated Sat, 10 Mar 2018 10:57:46 +0000
with message-id <1520679466.2744.57.camel@adam-barratt.org.uk>
and subject line Closing bugs for updates included in 9.4
has caused the Debian Bug report #884606,
regarding stretch-pu: package espeakup/1:0.80-5+b2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
884606: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884606
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: kibi@debian.org

Hello,

Several blind users have reported that the Debian Installer speech
synthesis was not working on their computer, thus making it unusable
for them. It happens that this is due to odd numbering of sound cards
by ALSA on those computers. We have fixed this in buster, it has been
successfully tested on the reported systems, so I propose to include the
fix in Stretch too, I have attached the diff. I'm also Cc-ing Kibi for
his opinion on this.

Samuel

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-debug'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.0 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff --git a/debian/changelog b/debian/changelog
index a908870..7a19a8d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+espeakup (1:0.80-5+deb9u1) stretch; urgency=medium
+
+  * debian/espeakup-udeb.start: Fix case where card 0 does not have an id or
+    where cards have non-contiguous indexes.
+  * debian/espeakup-udeb.finish-install: Use card id in installed system
+    to avoid issues with card detection ordering.
+
+ -- Samuel Thibault <sthibault@debian.org>  Sun, 17 Dec 2017 16:35:19 +0100
+
 espeakup (1:0.80-5) unstable; urgency=medium
 
   * Use canonical anonscm vcs URL.
diff --git a/debian/espeakup-udeb.finish-install b/debian/espeakup-udeb.finish-install
index 00e7e84..17c9182 100644
--- a/debian/espeakup-udeb.finish-install
+++ b/debian/espeakup-udeb.finish-install
@@ -12,4 +12,4 @@ apt-install espeakup alsa-utils || true
 
 cp /usr/share/espeakup-udeb/espeakup.default /target/etc/default/espeakup
 sed -i -e "s/^VOICE=.*/VOICE=$VOICE/" /target/etc/default/espeakup
-[ -z "$ALSA_CARD" ] || sed -i -e "s/^# ALSA_CARD=.*/ALSA_CARD=\"$ALSA_CARD\"/" /target/etc/default/espeakup
+[ -z "$ALSA_CARD" ] || sed -i -e "s/^# ALSA_CARD=.*/ALSA_CARD=\"`cat /sys/class/sound/card$ALSA_CARD/id`\"/" /target/etc/default/espeakup
diff --git a/debian/espeakup-udeb.start b/debian/espeakup-udeb.start
index d187d77..2f5db6a 100644
--- a/debian/espeakup-udeb.start
+++ b/debian/espeakup-udeb.start
@@ -1,7 +1,15 @@
+BASE=/sys/class/sound
+
+strip () {
+	cardid=${1#$BASE/card}
+	echo ${cardid%/id}
+}
+
 if lsmod | grep -q speakup_soft; then
 	# Give drivers some time to detect boards :/
 	sleep 2
-	N=$(ls /sys/class/sound/card*/id | wc -l)
+	IDS=$(echo $BASE/card*/id)
+	N=$(echo $IDS | wc -w)
 	case $N in
 		0)
 			echo No sound card detected, can not do software speech synthesis... Press enter to continue anyway.
@@ -9,17 +17,18 @@ if lsmod | grep -q speakup_soft; then
 			;;
 		1)
 			# Just one card, can not be wrong
-			echo 0 > /var/run/espeakup.card
-			/usr/bin/espeakup > /var/log/espeakup.log 2>&1
+			echo $(strip $IDS) > /var/run/espeakup.card
+			/usr/bin/espeakup -V en > /var/log/espeakup.log 2>&1
 			;;
 		*)
 			# Several cards, make the user choose
 			CARD=none
 			while [ "$CARD" = none ]
 			do
-				for i in $( seq 0 $(($N-1)) )
+				for ID in $IDS
 				do
-					ALSA_CARD=$(cat /sys/class/sound/card$i/id) /usr/bin/espeakup >> /var/log/espeakup.log 2>&1
+					i=$(strip $ID)
+					ALSA_CARD=$(cat /sys/class/sound/card$i/id) /usr/bin/espeakup -V en >> /var/log/espeakup.log 2>&1
 					while ! [ -r /var/run/espeakup.pid ]
 					do
 						sleep 0.1
@@ -41,6 +50,6 @@ if lsmod | grep -q speakup_soft; then
 				done
 			done
 			echo "$CARD" > /var/run/espeakup.card
-			ALSA_CARD=$(cat /sys/class/sound/card$CARD/id) /usr/bin/espeakup >> /var/log/espeakup.log 2>&1
+			ALSA_CARD=$(cat /sys/class/sound/card$CARD/id) /usr/bin/espeakup -V en >> /var/log/espeakup.log 2>&1
 	esac
 fi

--- End Message ---
--- Begin Message ---
Version: 9.4

Hi,

The update referenced by each of these bugs was included in this
morning's stretch point release.

Regards,

Adam

--- End Message ---

Reply to: