From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: installing python 2 and python 3 in the same profile Date: Tue, 13 Mar 2018 22:52:51 +0100 Message-ID: <87muzbzlqk.fsf@gnu.org> References: <87y3j4l3xj.fsf@mdc-berlin.de> 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]:44976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evrqt-00022h-F6 for guix-devel@gnu.org; Tue, 13 Mar 2018 17:53:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evrqq-0002kd-5S for guix-devel@gnu.org; Tue, 13 Mar 2018 17:52:59 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:40712) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evrqp-0002kG-Us for guix-devel@gnu.org; Tue, 13 Mar 2018 17:52:56 -0400 In-Reply-To: <87y3j4l3xj.fsf@mdc-berlin.de> (Ricardo Wurmus's message of "Wed, 7 Mar 2018 08:50:48 +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" To: Ricardo Wurmus Cc: Guix-devel Hello! Ricardo Wurmus skribis: > with the introduction of the collision avoidance feature that prevents > you from installing different variants of the same package into a > profile we made it impossible to install =E2=80=9Cpython=E2=80=9D and =E2= =80=9Cpython@2=E2=80=9D into > the same profile. > > It still works with ad-hoc environments, That=E2=80=99s because we explicitly disable the check in =E2=80=98guix env= ironment=E2=80=99 (commit afd06f605bf88a796acefc7ed598b43879346a6b). > but manifests containing both Python versions cannot be instantiated > any more. This is too strict, because we know that these two variants > don=E2=80=99t cause conflicts. More or less: =E2=80=98PYTHONPATH=E2=80=99 is version-independent, which I = suppose could be problematic. > What can we do to make this feature a little smarter? > > How about a package property that defines a =E2=80=9Cconflicts?=E2=80=9D = predicate that > takes two packages of the same name and determines (e.g. by checking the > major version) if these two packages are conflicting? If no such > predicate is provided we assume that packages with the same name cause a > conflict and prevent installation. Unfortunately it wouldn=E2=80=99t work in the general case where some profi= le entries may be coming from ~/.guix-profile/manifest, as is the case when you do: guix package -i python@2 guix package -i python@3 I would suggest short-term solutions, which are not exclusive: 1. Add a =E2=80=98--allow-collisions=E2=80=99 flag to =E2=80=98guix profi= le=E2=80=99 (we discussed it before but didn=E2=80=99t get around to doing it apparently!). 2. Use different package names when we know things can be parallel-installed: =E2=80=9Cpython2=E2=80=9D vs. =E2=80=9Cpython=E2= =80=9D (I=E2=80=99m talking about the package name, not its version string.) That=E2=80=99s what distros us= ually do, and I think it=E2=80=99s good enough. A longer-term solution would be to add a property like you suggest, except that it should be serializable (a regexp, an sexp, or something), such that we can keep it in ~/.guix-profile/manifest and honor it later. That adds complexity for something we could easily address through conventions. Thoughts? Ludo=E2=80=99.