unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>, guix-devel@gnu.org
Subject: Installing incompatible major versions of packages alongside each other
Date: Fri, 22 Jul 2016 10:59:37 +0200	[thread overview]
Message-ID: <20160722105937.47ce9aec@scratchpost.org> (raw)
In-Reply-To: <87d1m8d35a.fsf@gnu.org>

Hi Ludo,

> In the former command-line package specification syntax, which is still
> supported but deprecated, “ptpython-2” was taken to mean “version 2 of
> package ‘ptpython’”.  Because of this, you cannot refer to this
> “ptpython-2” package from the command-line (except with -e).
> 
> The solution is to call it differently, like “ptpython2”.

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 incompatible.

For example Python 3 changed "print" from prefix operator to function. So almost no program that uses Python 2 "print" will work in Python 3. (they also 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 interpreter.

I think this is a general rule. However, some packages and/or developers use non-standard version numbers. Therefore it would be good to be able to override this rule as a packager.

Therefore, Gentoo packages have something called a "SLOT". It's an extra number 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=3 in there] (and replace the thing in slot 3 if necessary)

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 replace 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 for version 7"

  reply	other threads:[~2016-07-22  8:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 17:47 Question about (properties `((python2-variant . ,(delay XXX)))) and name resolution Danny Milosavljevic
2016-07-20  3:58 ` Question about (properties `((python2-variant . , (delay " Leo Famulari
2016-07-20  7:26   ` Question about (properties `((python2-variant . ,(delay " Danny Milosavljevic
2016-07-20 10:15     ` Question about (properties `((python2-variant . , (delay " Ricardo Wurmus
2016-07-20 21:10       ` Question about (properties `((python2-variant . ,(delay " Danny Milosavljevic
2016-07-20 10:17     ` Question about (properties `((python2-variant . , (delay " Ludovic Courtès
2016-07-22  8:59       ` Danny Milosavljevic [this message]
2016-07-22 13:02         ` Installing incompatible major versions of packages alongside each other Ludovic Courtès
2016-07-22 14:14           ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160722105937.47ce9aec@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).