Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how do i protect a particular version
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
travis
n00b
n00b


Joined: 14 Aug 2002
Posts: 51

PostPosted: Mon Sep 08, 2003 3:28 pm    Post subject: how do i protect a particular version Reply with quote

I need to have both sun-jdk-1.3.1 and sun-jdk-1.4.x emerged at the same time. Today I noticed that an 'emerge -p world' shows sun-jdk-1.3.1 being updated to version sun-jdk-1.4.2.

How can I keep 1.3.1 but still emerge 1.4.2?
Back to top
View user's profile Send private message
robdavies
Tux's lil' helper
Tux's lil' helper


Joined: 06 Sep 2003
Posts: 90

PostPosted: Mon Sep 08, 2003 3:58 pm    Post subject: Reply with quote

The SLOTs feature in portage is intended to handle this. Though you probably would like a pre-canned solution, reading http://www.gentoo.org/doc/en/portage-manual.xml and making a slotted ebuild is the official way to do it.

You could install the sun-jdk outside of portage into a seperate directory and use the evironmental variables to select the older version you wish to use, if you don't want the latest.

Packages which don't allow versioned install directories might have problems co-existing, so someone has to check for incompatabilities and conflicts.
Back to top
View user's profile Send private message
travis
n00b
n00b


Joined: 14 Aug 2002
Posts: 51

PostPosted: Mon Sep 08, 2003 8:41 pm    Post subject: I was hoping you wouldn't say that Reply with quote

I thought of SLOTs, but was hoping there was a different way.

From my reading I thought slots were necessary when 2 version wanted to share the same filesystem namespace. This isn't a problem with /opt/sun-jdk-1.3.1 and /opt/sun-jdk-1.4.2.

Oh well, I'll think on it a bit. Thank for the reply.
Back to top
View user's profile Send private message
travis
n00b
n00b


Joined: 14 Aug 2002
Posts: 51

PostPosted: Mon Sep 08, 2003 8:42 pm    Post subject: I was hoping you wouldn't say that Reply with quote

I thought of SLOTs, but was hoping there was a different way.

From my reading I thought slots were necessary when 2 version wanted to share the same filesystem namespace. This isn't a problem with /opt/sun-jdk-1.3.1 and /opt/sun-jdk-1.4.2.

Oh well, I'll think on it a bit. Thank for the reply.
Back to top
View user's profile Send private message
TGL
Bodhisattva
Bodhisattva


Joined: 02 Jun 2002
Posts: 1978
Location: Rennes, France

PostPosted: Mon Sep 08, 2003 9:30 pm    Post subject: Re: I was hoping you wouldn't say that Reply with quote

travis wrote:
From my reading I thought slots were necessary when 2 version wanted to share the same filesystem namespace.


- Slots are necessary when several version of a package are useful at the same time (libfoobar-1.0 and libfoobar-2.0 if they are incompatible for instance).

- Slots are possible when this two (or more) version won't overwrite each other, and when their use will be deterministic enough. In the case of jdk, separate dirs have been choosen to avoid overwritings, and the "java-config" tools has been designed to allow the user to choose a deterministic way which version he will use.

Hence, because it fulfill this two requirements, sun-jdk has been slotted (1.3 vs. 1.4), and you can do the update without loosing your 1.3 version.

But, just for information, in case you really want to protect a package foo/bar-1.2.3 from any up(down)grade, you can create a file /etc/portage/package.mask and put there the following too masking rules:
Code:
<foo/bar-1.2.3
>foo/bar-1.2.3
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9530
Location: beyond the rim

PostPosted: Mon Sep 08, 2003 10:15 pm    Post subject: Reply with quote

BTW, the sun-jdk ebuilds are already SLOTted as shown by etcat:
Code:
 $ etcat -v sun-jdk
[ Results for search key : sun-jdk ]
[ Applications found : 1 ]

*  dev-java/sun-jdk :
        [   ] dev-java/sun-jdk-1.3.1.09 (1.3)
        [   ] dev-java/sun-jdk-1.4.1.04 (1.4)
        [   ] dev-java/sun-jdk-1.4.2.01 (1.4)
        [   ] dev-java/sun-jdk-1.4.2 (1.4)

Back to top
View user's profile Send private message
travis
n00b
n00b


Joined: 14 Aug 2002
Posts: 51

PostPosted: Mon Sep 08, 2003 10:21 pm    Post subject: thanks Reply with quote

Thank you for the replies.

When I saw:
[ebuild FU ] dev-java/sun-jdk-1.4.2.01 [1.3.1.09]

I assumed 1.3.1.09 was going bye bye. etcat is good, haven't used it before.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum