From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Installing incompatible major versions of packages alongside each other Date: Fri, 22 Jul 2016 10:59:37 +0200 Message-ID: <20160722105937.47ce9aec@scratchpost.org> References: <20160719194754.254cf411@scratchpost.org> <20160720035823.GB21435@jasmine> <20160720092637.5813b122@scratchpost.org> <87d1m8d35a.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]:34895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQWJD-0005kq-UT for guix-devel@gnu.org; Fri, 22 Jul 2016 04:59:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQWJ9-0001e5-Q6 for guix-devel@gnu.org; Fri, 22 Jul 2016 04:59:50 -0400 In-Reply-To: <87d1m8d35a.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" To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= , guix-devel@gnu.org Hi Ludo, > In the former command-line package specification syntax, which is still > supported but deprecated, =E2=80=9Cptpython-2=E2=80=9D was taken to mean = =E2=80=9Cversion 2 of > package =E2=80=98ptpython=E2=80=99=E2=80=9D. Because of this, you cannot= refer to this > =E2=80=9Cptpython-2=E2=80=9D package from the command-line (except with -= e). >=20 > The solution is to call it differently, like =E2=80=9Cptpython2=E2=80=9D. Hmm, it doesn't seem as if Guix Python itself uses that policy. Python 2.7 = is called "python-2.7" (note: dash) I'm used to semantic version numbers. Usually, the major version is increased because something major is incompat= ible. For example Python 3 changed "print" from prefix operator to function. So a= lmost no program that uses Python 2 "print" will work in Python 3. (they al= so changed the default string representation and lots of other things) Therefore, it makes sense (and is common) to install and use both Python 2 = and Python 3. For pypython, too, you'd have it be able to use a Python 2 and a Python 3 i= nterpreter. I think this is a general rule. However, some packages and/or developers us= e non-standard version numbers. Therefore it would be good to be able to ov= erride this rule as a packager. Therefore, Gentoo packages have something called a "SLOT". It's an extra nu= mber in the package spec which specifies which slot of the base package you= want to fill in the installation. For example if you install dev-lang/python-3.4.3 it will install it in slot 3 [the 3 is in the package file which you can't = see here; it says SLOT=3D3 in there] (and replace the thing in slot 3 if ne= cessary) and if you install dev-lang/python-2.7.3 it will install it in slot 2 [it says so in the package spec file] (and rep= lace the thing in slot 2 if necessary). If you uninstall dev-lang/python it will remove both. If you uninstall dev-lang/python-3.4.3 it will just remove this one. For a completely different take, Debian just adds this kind of slot number = to the package basename - as you suggest I do. There, it would just be "python2.6" for Python 2.6 and "python3" for Python= 3. Which mechanism does Guix use? Which should it use? The guix.texi manual seems to advocate using names like "python-2" - which = I seem to have the most problems in practise with. For example right now I = can't install icedtea-7: "guix package: error: icedtea: package not found f= or version 7"