Skip to contentSkip to conversation

alsa-state: ignore 'No soundcards found' error in pkg_postinst

PATCH New Yi Zhao 1 participant 1 message Apr 17, 2020

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH 1/1 alsa-state: ignore 'No soundcards found' error in pkg_postinst

If there is no soundcards on the target (e.g. qemu), the pkp_postinst function will report an error:
alsactl: load_state:1735: No soundcards found...
pkg_run_script: package "alsa-state" postinst script returned status 19.
opkg_configure: alsa-state.postinst returned 19.

Pass '-g' option to alsactl to ignore this error.

---
 meta/recipes-bsp/alsa-state/alsa-state.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/alsa-state/alsa-state.bb +1 -1
index 0670556999..cec2272c80 100644
@@ -62,7 +62,7 @@ pkg_postinst_${PN}() {
 	then
 		if test -x ${sbindir}/alsactl
 		then
-			${sbindir}/alsactl -f ${localstatedir}/lib/alsa/asound.state restore
+			${sbindir}/alsactl -g -f ${localstatedir}/lib/alsa/asound.state restore
 		fi
 	fi
 }
Signature · 1 line
2.17.1