From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 3/4] gnu: libcanberra: Add propagated-input. Date: Wed, 07 Jan 2015 21:11:29 +0100 Message-ID: <87zj9uz6z2.fsf@gnu.org> References: <87oaqxqn2h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8wx5-0001ia-0f for guix-devel@gnu.org; Wed, 07 Jan 2015 15:11:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8wx1-0000Wq-QU for guix-devel@gnu.org; Wed, 07 Jan 2015 15:11:34 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:59671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8wx1-0000We-BX for guix-devel@gnu.org; Wed, 07 Jan 2015 15:11:31 -0500 In-Reply-To: (Federico Beffa's message of "Sun, 21 Dec 2014 16:33:51 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Federico Beffa Cc: Guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable (Sorry for the delay.) Federico Beffa skribis: > On Sun, Dec 21, 2014 at 12:06 PM, Ludovic Court=C3=A8s wro= te: >> Federico Beffa skribis: >> >>> I propose to make sound-theme-freedesktop a propagated input of >>> libcanberra. This is because, according to the XDG sound theme >>> specification, those event sounds should always be present and used as >>> fall-back in case other sounds are not present. >>> >>> http://www.freedesktop.org/wiki/Specifications/sound-theme-spec/ >> >> That=E2=80=99s not the right fix, I think. For instance, if Evince is i= nstalled >> in a profile, but libcanberra itself is not in the profile, then the >> sound theme is not pulled and ends up not being used. >> >> Would it be possible, instead, to patch libcanberra to refer to the >> sound-theme directory as its fallback? > > The location of the sound theme is specified, among other things, by > the variable XDG_DATA_DIRS. So, if an application makes use of the > glib-or-gtk-build-system and has the sounds as inputs, then it should > find them. I don't think we need to patch libcanberra in any way. > > With my suggestion I was trying to avoid having to specify > sound-theme-freedesktop in addition to libcanberra in every gtk > application (as, e.g., evince). > > If we make libcanberra a propagated-input of applications like evince, > then they would automatically know the location of the sounds (by the > inheritance of propagated inputs). OK, I understand the plan. What I had in mind was to instead add sound-theme-freedesktop as an input to libcanberra, and to patch libcanberra along these untested lines: --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- libcanberra-0.30/src/sound-theme-spec.c~ 2010-02-20 00:39:40.000000000 +0100 +++ libcanberra-0.30/src/sound-theme-spec.c 2015-01-07 21:08:51.029841980 +0100 @@ -69,8 +69,7 @@ int ca_get_data_home(char **e) { else if ((env = getenv("HOME")) && *env == '/') subdir = "/.local/share"; else { - *e = NULL; - return CA_SUCCESS; + subdir = "/gnu/store/...-sound-theme/share"; } if (!(r = ca_new(char, strlen(env) + strlen(subdir) + 1))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I believe this is the simplest approach, and one that is likely to always work. WDYT? Thanks, Ludo=E2=80=99. --=-=-=--