From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: Re: Install hook Date: Sun, 19 Mar 2017 14:14:14 +0100 Message-ID: <20170319131413.GA3671@jocasta.intra> References: <1489919448.1067.2.camel@pelzflorian.de> <20170319112339.GA2875@jocasta.intra> <20170319131437.00d9608e@polymos.lepiller.eu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpaf7-0007wx-OE for guix-devel@gnu.org; Sun, 19 Mar 2017 09:14:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpaf4-0007JF-IA for guix-devel@gnu.org; Sun, 19 Mar 2017 09:14:21 -0400 Received: from de.cellform.com ([88.217.224.109]:33042 helo=jocasta.intra) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cpaf4-0007FX-5U for guix-devel@gnu.org; Sun, 19 Mar 2017 09:14:18 -0400 Content-Disposition: inline In-Reply-To: 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" To: "pelzflorian (Florian Pelz)" Cc: guix-devel@gnu.org --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The problem as I understand it is as follows: Two (or more) packages both contain a file: /gnu/store/.../xyz/foo So long as those two packages are not both installed into the same profile = at the same time, this is not a problem. However if the user chooses to=20 install both packages concurrently, then there is a potential conflict and Guix "resolves" this conflict by arbitrarily choosing the xyz/foo from one package or the other. One could put a "hook" on package A which (through some method) says: "When this package (A) is installed, then the xyz/foo file from THIS package must be the one installed into the profile, and not any other one." That will work fine so long as only package A has such a hook. But what=20 happens if package B also contains an identical hook? Both packages' hooks will then insist that their xyz/foo is the one which must be installed. Nothing will have been solved. There will still be a conflict, just shifted up a level. The issue as I see it is that neither file is the "right" one to install -= =20 or to put it another way - BOTH are the right ones. The solutions which I think have been discussed previously are: 1. Add an option to the "guix package --install" command to allow the user to specify which packages' files should take priority. 2. Use some kind of heuristic based on date installed and other info to guess which one is "right". 3. ... probably some other suggestions which I've probably forgotten. Also, I think we talked about consolidating the warning messages when these conflicts occur, so that a less overwhelming number of them are emitted. J' On Sun, Mar 19, 2017 at 01:50:08PM +0100, pelzflorian (Florian Pelz) wrote: On 03/19/2017 01:14 PM, Julien Lepiller wrote: > I think install hooks are scripts run after each package installatio= n, > that are provided by the package itself. We already have a similar > mechanism that takes place when building the user's profile. See > http://git.savannah.gnu.org/cgit/guix.git/tree/guix/profiles.scm. > For instance, we build a icon-theme.cache cache file for every icon > theme in the user's profile. >=20 > I have seen references to gschemas.compiled in our > gtk-or-glib-build-system. Currently we build the file in each packag= e, > which means that only one version will be present in the user's prof= ile > if they install more that one package containing this file. I believe > gschemas.compiled contains important information about some graphical > packages, and in our current system, only one package can be referen= ced > that way. >=20 > I think we should make sure that this file is never present in the > output of a package, and add a function to build it in profiles.scm. >=20 > Does it make any sense? >=20 =20 Yes, exactly. These profile hooks look similar to what I meant. =20 =20 --=20 Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key. --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAljOhCUACgkQimdxnC3oJ7POqQCfVWMcFWvdsj+LSJvjEy0xCUSJ 64EAn3cMxAYIklthvWAnmhlN7EJij/0K =gNsA -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7--