From fec9d9b2486ce9e89fc73de560fdefc020015ce6a882219224a7dd45257a0029 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 18 Oct 2020 21:58:16 +0000 Subject: [PATCH] Accepting request 842418 from home:tiwai:branches:multimedia:libs - Migrate the old asound.state file if the new path isn't present yet (bsc#1177826) OBS-URL: https://build.opensuse.org/request/show/842418 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=183 --- alsa-utils.changes | 2 ++ alsa-utils.spec | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/alsa-utils.changes b/alsa-utils.changes index b7ef0fb..57c2493 100644 --- a/alsa-utils.changes +++ b/alsa-utils.changes @@ -2,6 +2,8 @@ Sun Oct 18 19:12:43 CEST 2020 - tiwai@suse.de - Use /run/lock for alsactl lock directory (bsc#1177826) +- Migrate the old asound.state file if the new path isn't present + yet (bsc#1177826) ------------------------------------------------------------------- Mon Oct 5 12:39:42 CEST 2020 - tiwai@suse.de diff --git a/alsa-utils.spec b/alsa-utils.spec index 6ee6afd..dabdf19 100644 --- a/alsa-utils.spec +++ b/alsa-utils.spec @@ -116,6 +116,11 @@ install -c -m 0755 %{SOURCE5} %{buildroot}%{_prefix}/lib/systemd/scripts %post %service_add_post sound-extra.service +# migrate the old asound.state +test -f %{_localstatedir}/lib/alsa/asound.state || \ + test -f /etc/asound.state && \ + cp -a /etc/asound.state %{_localstatedir}/lib/alsa/asound.state +exit 0 %preun %service_del_preun sound-extra.service