From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?5a6L5paH5q2m?= Subject: Re: TODO: user-environment-hook Date: Sat, 03 Jan 2015 14:45:01 +0800 Message-ID: <87tx08s6qa.fsf@gmail.com> References: <87387tzt9r.fsf@gmail.com> <87a920eud3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7ISL-0006Dc-8G for guix-devel@gnu.org; Sat, 03 Jan 2015 01:45:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7ISK-0007iI-Ao for guix-devel@gnu.org; Sat, 03 Jan 2015 01:45:01 -0500 In-Reply-To: <87a920eud3.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: > =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > >> Currently, (guix profiles) has code to build 'info-dir' for packages in = profile. >> As mentioned in TODO, IIUC, we should move the code to 'texinfo'. > > Yes, that=E2=80=99s the initial idea. However, it=E2=80=99s not clear th= at attaching > =E2=80=9Cuser environment hooks=E2=80=9D to packages is the right thing. > > For instance, you can install Info files, and if you only ever use the > Info reader of Emacs, you never install Texinfo itself; yet, the =E2=80= =98dir=E2=80=99 > file must be generated. > >> Other usecases include: >> * hicolor-icon-theme: use gtk-update-icon-cache to get 'icon-theme.cache= '. >> * shared-mime-info: use update-mime-database to get 'mime.cache'. >> * desktop-file-utils: use update-desktop-database to get 'mimeinfo.cache= '. >> ? glib: use glib-compile-schemas to get 'gschema.compiled'. > > Same problem here: users may never explicitly install GLib, yet these > operations should always be performed. > > So I=E2=80=99m tempted to think we could just augment =E2=80=98profile-de= rivation=E2=80=99 to > invoke other hooks similar to =E2=80=98info-dir-file=E2=80=99 in (guix pr= ofile). We > could specify a list of =E2=80=9Cprofile hooks=E2=80=9D like: > > `(("share/info" . ,info-dir-file) > ("share/foo/mime.cache" . ,mime-cache-file)) > > WDYT? OK, I'll try to do this way :) > >> For schemas, it's always safe for packages in system profile, >> but may broken for user profile: >> user had install package A >> user update the guix disto, A -> A' has incompatible schema change >> user now install package B' which depend on schema of A' >> B' will crash if we have schemas from A and B'. >> >> If we make A a propagated-inputs of B, dose A will be update to A' when >> install B'? > > Yes, when installing a package with propagated inputs, said inputs are > installed as well, possibly overriding others. However, if you look at > collision handling in (guix build union) is minimalist, so anything can > happen. > > Thanks, > Ludo=E2=80=99.