You are not logged in.

#1 2011-12-01 13:56:27

nicoulaj
Member
From: France
Registered: 2011-10-10
Posts: 34

Alternatives system ?

Hi all,
Is there something like Debian's alternatives system in Arch ?
As a Java developer, I often need to switch between Java 5 and 6, and Maven 2 and 3, which are different packages providing the same commands...  But those are only examples. How do you usually deal with that ?
The way Python 2/3 is dealt with seems to indicate there is no real solution ?

Last edited by nicoulaj (2011-12-01 13:57:47)


AUR | github | IRC:nicoulaj

Offline

#2 2011-12-01 15:14:57

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Alternatives system ?

Arch follows upstream, ships the latest and greatest software.
Both python 2 and 3 are available, the thing that changes is which version is the default.

Offline

#3 2011-12-01 15:27:29

nicoulaj
Member
From: France
Registered: 2011-10-10
Posts: 34

Re: Alternatives system ?

I understand (and agree with) the choice made. Python 3 is the default and it provides the "python" command, python2 provides the "python2" command. Perfectly fine smile

What we are talking about here is packages that provide different implementations of the same command, and ship with the same command name, ie conflict with each other. The best example is openjdk vs jdk. No way/utility/hack to switch between those packages without uninstalling+installing ?


AUR | github | IRC:nicoulaj

Offline

#4 2011-12-01 15:54:13

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 239
Website

Re: Alternatives system ?

nicoulaj wrote:

I understand (and agree with) the choice made. Python 3 is the default and it provides the "python" command, python2 provides the "python2" command. Perfectly fine smile

What we are talking about here is packages that provide different implementations of the same command, and ship with the same command name, ie conflict with each other. The best example is openjdk vs jdk. No way/utility/hack to switch between those packages without uninstalling+installing ?

I don't know if this will work, but:
you could build both manually via abs and change the prefix of both. For example build openjdk with PREFIX=/usr/local/openjdk-prefix and jdk with PREFIX=/usr/local/jdk-prefix.
This way, to switch between both, you just have to edit your $PATH to point to /usr/local/jdk-prefix/usr/bin or /usr/local/openjdk-prefix/usr/bin respectivly.

Offline

#5 2011-12-01 16:54:15

nicoulaj
Member
From: France
Registered: 2011-10-10
Posts: 34

Re: Alternatives system ?

May be this can be done at install time, by hooking into pacman and making it extract stuff from /usr/bin somewhere else, or use fakeroot... Pretty sure this will mess everything though smile


AUR | github | IRC:nicoulaj

Offline

Board footer

Powered by FluxBB