File 0013-alsactl-Do-not-run-udev-rule-before-datadir-sbindir-.patch of Package alsa-utils.openSUSE_13.1_Update

From be4565c84163a158bec5380df6c0201f738c2013 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Fri, 13 Jun 2014 10:04:25 +0200
Subject: [PATCH] alsactl: Do not run udev rule before datadir/sbindir are both
 mounted

Sometimes 90-alsa-restore.rules is run before /usr is mounted,
and alsactl restore depends on /usr/share/alsa being present.

If /usr/share/alsa is not present, we're so early in the boot
process that alsa-restore.service (or upstart equivalent) will
run later on.

BugLink: https://bugs.launchpad.net/bugs/1289730
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
 alsactl/90-alsa-restore.rules.in |    2 +-
 alsactl/Makefile.am              |    1 +
 configure.in                     |    1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

--- a/alsactl/90-alsa-restore.rules.in
+++ b/alsactl/90-alsa-restore.rules.in
@@ -1,4 +1,4 @@
-ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="alsa_restore_go"
+ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST=="@sbindir@", TEST=="@datadir@", GOTO="alsa_restore_go"
 GOTO="alsa_restore_end"
 
 LABEL="alsa_restore_go"
--- a/alsactl/Makefile.am
+++ b/alsactl/Makefile.am
@@ -42,6 +42,7 @@ endif
 
 edit = \
 	$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
+		  -e 's,@datadir\@,$(mydatadir),g' \
 		  -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
 							< $< > $@ || rm $@
 
--- a/configure.in
+++ b/configure.in
@@ -285,6 +285,7 @@ AC_DEFINE_UNQUOTED(SOUNDSDIR, "$soundsdi
 
 mydatadir="$dir/alsa"
 AC_DEFINE_UNQUOTED(DATADIR, "$mydatadir", [directory containing alsa configuration])
+AC_SUBST(mydatadir)
 
 AC_ARG_WITH(testsound,
   AS_HELP_STRING([--with-testsound=file], [give the path of test sound file for alsaconf]),
openSUSE Build Service is sponsored by