Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fundamental portage questions about SLOTs
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
fritte
n00b
n00b


Joined: 18 Aug 2003
Posts: 51

PostPosted: Sat Aug 23, 2003 10:03 am    Post subject: Fundamental portage questions about SLOTs Reply with quote

Hello!

I'm fairly new to portage but not to linux/unix in general. I've just read the online Portage manual (http://www.gentoo.org/doc/en/portage-manual.xml) and I very much like the SLOT system, where one can have multiple versions of a certain package installed at the same time.

However, I don't get it.

This is the case at hand:

I've got a fresh install of Gentoo here, and now I want to install k3b, the cdr tool. Look:

Code:

root # emerge --pretend k3b

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N   ] media-sound/normalize-0.7.6-r1
[ebuild  N   ] media-libs/netpbm-9.12-r4
[ebuild  N   ] media-libs/jpeg-mmx-1.1.2-r1
[ebuild  N   ] media-libs/libmovtar-0.1.3-r1
[ebuild  N   ] media-libs/a52dec-0.7.4
[ebuild    U ] media-libs/freetype-1.3.1-r3 [2.1.4]
[ebuild  N   ] media-libs/imlib2-1.0.6.20030220-r1
[ebuild  N   ] app-text/texi2html-1.64
[ebuild  N   ] media-video/ffmpeg-0.4.7_pre20030624
[ebuild  N   ] media-video/avifile-0.7.32.20030219
[ebuild  N   ] media-libs/libquicktime-0.9.2_pre1
[ebuild  N   ] media-video/mjpegtools-1.6.0-r7
[ebuild  N   ] app-text/dgs-0.5.10-r1
[ebuild  N   ] media-libs/jbigkit-1.4
[ebuild  N   ] media-video/mpeg2vidcodec-12-r1
[ebuild  N   ] media-gfx/imagemagick-5.5.6-r1
[ebuild  N   ] dev-libs/lzo-1.08
[ebuild  N   ] media-libs/openquicktime-1.0-r1
[ebuild  N   ] media-video/transcode-0.6.6
[ebuild  N   ] app-cdr/k3b-0.8.1-r1


Obviously, this action will "upgrade" (in reality; downgrade) my freetype 2.1.4 package to version 1.3.1r3. Will it then *replace* my 2.1.4 package, or will it install 1.3.1r3 side by side, so that all my packages that that depend on the newer version can continue to work?

The section in the manual about SLOTs hinted that the system should keep both versions installed and ready for use, but I don't trust it until I've got this thing explained to me.

I'm very thankful for any help on this!
Back to top
View user's profile Send private message
boltronics
n00b
n00b


Joined: 25 Nov 2002
Posts: 49
Location: Melbourne, Australia

PostPosted: Sat Aug 23, 2003 10:24 am    Post subject: Reply with quote

Good question. I've always taken it for granted that it is doing the right thing and actually installing multiple versions.

But then why does it compare 1.3.1-r3 with 2.1.4? If portage is doing the 'right thing' regarding SLOTs, then it would appear that it's display with the --pretend switch is buggy.

I'm certain it's a bug, but I too would like somebody to confirm.
_________________
"Free" as in "free speech", not as in "free beer".
GPG key ID: 0x78FDC750
Back to top
View user's profile Send private message
TGL
Bodhisattva
Bodhisattva


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

PostPosted: Sat Aug 23, 2003 10:29 am    Post subject: Re: Fundamental portage questions about SLOTs Reply with quote

fritte wrote:
Code:
[ebuild    U ] media-libs/freetype-1.3.1-r3 [2.1.4]


Obviously, this action will "upgrade" (in reality; downgrade) my freetype 2.1.4 package to version 1.3.1r3. Will it then *replace* my 2.1.4 package, or will it install 1.3.1r3 side by side, so that all my packages that that depend on the newer version can continue to work?


Install side by side, cause freetype 1.x & 2.x are in different slots. If it was a real downgrade, then "emerge -p" output would have been "[ebuild UD] ...". But it's true that the output should be more explicit (it is so obscure that I think we can call it bugy): it would be better if there was no mention of the 2.1.4 version, like if two versions in differents slots were two different packages.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


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

PostPosted: Sat Aug 23, 2003 10:30 am    Post subject: Reply with quote

Yes, the display for SLOTed packages on emerge -p is confusing. I made a small patch for portage on bug 26139 to make it a bit clearer by using another letter when portage is installing another SLOT.
Back to top
View user's profile Send private message
fritte
n00b
n00b


Joined: 18 Aug 2003
Posts: 51

PostPosted: Sat Aug 23, 2003 10:30 am    Post subject: Reply with quote

I think so too!

If portage (emerge) is about to install another version of a previously installed package, it should say so, it shouldn't say "UPDATE" which is very misleading. Especially when you have 5 years of broken library versions from redhat, mandrake, debian (not so often though) behind you... you tend to get *very* careful. Especially (again!) when there's font things involved. I HATE crappy fonts and ugly desktops!
Back to top
View user's profile Send private message
fritte
n00b
n00b


Joined: 18 Aug 2003
Posts: 51

PostPosted: Sat Aug 23, 2003 10:32 am    Post subject: Reply with quote

So, to solve the problem at hand; how to I make sure that it won't remove freetype 2.1.4 in this particular case?
Back to top
View user's profile Send private message
IWBCMAN
Guru
Guru


Joined: 25 Jun 2002
Posts: 474

PostPosted: Sat Aug 23, 2003 10:51 am    Post subject: Reply with quote

fritte,

Your question has alaready been answered. If portage was going to delete your 2.1.4 version of freetype in the course of installing the 1.3.1 version, portagew would have reported saying :

[ebuild UD]media-libs/freetype-1.3.1-r3 [2.1.4]

But as your posting showed, portage reports:
[ebuild U ] media-libs/freetype-1.3.1-r3 [2.1.4]

Notice the dfifference between the two ? "D" in this case means delete- since "D" did not appear in the display which emerge -pretend k3b generated, you can deduce that the 2.1.4 version is being installed into another SLOT than 1.3.1-r3....if the two versions were to want occupy the same SLOT the already installed package would "B"lock the other package from being installed, in which case you have to unmerge the installed one and risk breaking other mutual dependencies, or portage would remove the previosuly installed package upon installation of the newer(other) package..


furthermore you can simply look at the ebuilds themeselves:
from /usr/portage/media-libs/freetype/freetype-1.3.1-r3.ebuild
Code:

# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/media-libs/freetype/freetype-1.3.1-r3.ebuil$                                                                               
IUSE="nls"
                                                                               
# r3 change by me (danarmak): there's a contrib dir inside the freetype1
# sources with important utils: ttf2bdf, ttf2pfb, ttf2pk, ttfbanner.
# These aren't build together with the main tree: you must configure/make
# separately in each util's directory. However ttf2pfb doesn't compile
# properly. Therefore we download freetype1-contrib.tar.gz which is newer
# and coresponds to freetype-pre1.4. (We don't have an ebuild for that
# because it's not stable?) We extract it to freetype-1.3.1/freetype1-contrib
# and build from there.
# When we update to freetype-pre1.4 or any later version, we should use
# the included contrib directory and not download any additional files.
                                                                               
inherit gnuconfig
                                                                               
P2=${PN}1-contrib
S=${WORKDIR}/${P}
DESCRIPTION="TTF-Library"
SRC_URI="ftp://ftp.freetype.org/freetype/freetype1/${P}.tar.gz
         ftp://ftp.freetype.org/freetype/freetype1/${P2}.tar.gz
         http://ftp.sunet.se/pub/text-processing/freetype/freetype1/${P}.tar.gz
         http://ftp.sunet.se/pub/text-processing/freetype/freetype1/${P2}.tar.g$HOMEPAGE="http://www.freetype.org/"
                                                                               
SLOT="1"------------------------------------------------------------------<<<<
LICENSE="FTL"
KEYWORDS="x86 ppc sparc alpha hppa amd64"
                                                                               
DEPEND="virtual/glibc"



and from
/usr/portage/media-libs/freetype/freetype-2.4.1.ebuild

Code:

# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/media-libs/freetype/freetype-2.1.4.ebuild,v$                                                                               
IUSE="doc zlib bindist"
                                                                               
inherit eutils flag-o-matic
                                                                               
FT_SMOOTH_VER="20021210"
                                                                               
SPV="`echo ${PV} | cut -d. -f1,2`"
DESCRIPTION="A high-quality and portable font engine"
SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
        doc? ( mirror://sourceforge/${PN}/ftdocs-${PV}.tar.bz2 )"
                                                                               
HOMEPAGE="http://www.freetype.org/"
                                                                               
SLOT="2"--------------------------------------------------------------------<<<
LICENSE="FTL | GPL-2"
KEYWORDS="x86 ~ppc sparc ~alpha hppa ~arm"
                                                                               
DEPEND="virtual/glibc
Back to top
View user's profile Send private message
fritte
n00b
n00b


Joined: 18 Aug 2003
Posts: 51

PostPosted: Sat Aug 23, 2003 10:58 am    Post subject: Reply with quote

This was very informative! Thank you!
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


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

PostPosted: Sat Aug 23, 2003 11:08 am    Post subject: Reply with quote

IWBCMAN wrote:
fritte,

Your question has alaready been answered. If portage was going to delete your 2.1.4 version of freetype in the course of installing the 1.3.1 version, portagew would have reported saying :

[ebuild UD]media-libs/freetype-1.3.1-r3 [2.1.4]

But as your posting showed, portage reports:
[ebuild U ] media-libs/freetype-1.3.1-r3 [2.1.4]

Notice the dfifference between the two ? "D" in this case means delete- since "D" did not appear in the display which emerge -pretend k3b generated, you can deduce that the 2.1.4 version is being installed into another SLOT than 1.3.1-r3....if the two versions were to want occupy the same SLOT the already installed package would "B"lock the other package from being installed, in which case you have to unmerge the installed one and risk breaking other mutual dependencies, or portage would remove the previosuly installed package upon installation of the newer(other) package..


That's a bit wrong: the UD vs. U indeed shows that freetype is SLOTed, however the D means Downgrade, not Delete. And the Blocking stuff is also wrong, they would not block each other only because they are in the same SLOT.
Back to top
View user's profile Send private message
fritte
n00b
n00b


Joined: 18 Aug 2003
Posts: 51

PostPosted: Sat Aug 23, 2003 11:32 am    Post subject: Reply with quote

I'm confused again... if beeing in the same slot (I interpret that as having the same SLOT="xxx" in the ebuild file) does not block packages out (they ARE competing for the same "space") then what does?

The difference between "downgrade" and "deleting" is almost academical in this case, it seems. Downgrading implies deleting the old package so.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


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

PostPosted: Sat Aug 23, 2003 11:53 am    Post subject: Reply with quote

fritte wrote:
I'm confused again... if beeing in the same slot (I interpret that as having the same SLOT="xxx" in the ebuild file) does not block packages out (they ARE competing for the same "space") then what does?


If two versions are in the same SLOT they are subject to the normal upgrade paths, e.g. a package has versions 1.1 and 1.2 with SLOT=1 and a version 2.0 with SLOT=2, then you can have 1.1 and 2.0 or 1.2 and 2.0 installed parallel, but 1.1 could not coexist with 1.2.
Maybe you meant the same, but blocking is another feature of portage, that's why I don't like the term here.

Quote:
The difference between "downgrade" and "deleting" is almost academical in this case, it seems. Downgrading implies deleting the old package so.


So does upgrading.
The problem is that the output is irritating at best, that's why I patched my local version of portage, so your emerge -p output would read:

Code:

root # emerge --pretend k3b

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N   ] media-sound/normalize-0.7.6-r1
[ebuild  N   ] media-libs/netpbm-9.12-r4
[ebuild  N   ] media-libs/jpeg-mmx-1.1.2-r1
[ebuild  N   ] media-libs/libmovtar-0.1.3-r1
[ebuild  N   ] media-libs/a52dec-0.7.4
[ebuild    S ] media-libs/freetype-1.3.1-r3 [2.1.4]
[ebuild  N   ] media-libs/imlib2-1.0.6.20030220-r1
[ebuild  N   ] app-text/texi2html-1.64
[ebuild  N   ] media-video/ffmpeg-0.4.7_pre20030624
[ebuild  N   ] media-video/avifile-0.7.32.20030219
[ebuild  N   ] media-libs/libquicktime-0.9.2_pre1
[ebuild  N   ] media-video/mjpegtools-1.6.0-r7
[ebuild  N   ] app-text/dgs-0.5.10-r1
[ebuild  N   ] media-libs/jbigkit-1.4
[ebuild  N   ] media-video/mpeg2vidcodec-12-r1
[ebuild  N   ] media-gfx/imagemagick-5.5.6-r1
[ebuild  N   ] dev-libs/lzo-1.08
[ebuild  N   ] media-libs/openquicktime-1.0-r1
[ebuild  N   ] media-video/transcode-0.6.6
[ebuild  N   ] app-cdr/k3b-0.8.1-r1


to indicate that freetype is not a downgrade or upgrade.


Last edited by Genone on Sat Aug 23, 2003 11:55 am; edited 1 time in total
Back to top
View user's profile Send private message
fritte
n00b
n00b


Joined: 18 Aug 2003
Posts: 51

PostPosted: Sat Aug 23, 2003 11:54 am    Post subject: Reply with quote

Your output is better, that patch has my vote. (Btw, is there a voting system like in the mozilla project?)
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


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

PostPosted: Sat Aug 23, 2003 12:02 pm    Post subject: Reply with quote

In theory: yes, as Gentoo uses the same software for bugtracking, but for some reason it is disabled or not working. However, that bug got closed because there are more issues with the SLOT system that are adressed by another bug. Post a comment on the bug if you like it, maybe they'll reconsider.
Back to top
View user's profile Send private message
fritte
n00b
n00b


Joined: 18 Aug 2003
Posts: 51

PostPosted: Sat Aug 23, 2003 12:16 pm    Post subject: Reply with quote

Hm... now that I look at the bug (https://bugs.gentoo.org/show_bug.cgi?id=26139) I agree with SpanKY, who made the comment that instead of showing "U" or "S", it should show the version corresponding to each SLOT.

In my case, that would be something like:

freetype SLOT 1: 1.3.1r3 [ U ]
freetype SLOT 2: 2.1.4

This is discussed in https://bugs.gentoo.org/show_bug.cgi?id=4698 and they seem to be getting somewhere.
Back to top
View user's profile Send private message
neysx
Retired Dev
Retired Dev


Joined: 27 Jan 2003
Posts: 795

PostPosted: Sat Aug 23, 2003 1:17 pm    Post subject: Reply with quote

I was about to complain about this discrepancy when I noticed this thread. I'll just add my €0.02
Look at this
Code:

[ebuild     U ] sys-libs/db-4.0.14-r2 [4.0.14-r1] +tcltk +java +doc
[ebuild     U ] blah blah
[ebuild     U ] blah
[ebuild     U ] sys-libs/db-3.2.9-r8 [4.0.14-r1] +doc

The fact that the version displayed between [] is not the version that is going to be upgraded for slotted packages is confusing, misleading and simply wrong.
How many people have asked whether their package would be downgraded ? How many times have they been told that the (<- this is a white space) means the package will not be downgraded ?

A consistent approach would be to display the version of the package that [is going to|could|should] be upgraded like this
Code:

[ebuild     U ] sys-libs/db-4.0.14-r2 [4.0.14-r1] +tcltk +java +doc
[ebuild     U ] sys-libs/db-3.2.9-r8 [3.2.9-r7] +doc

Ideally with a way to tell users that a simple emerge db would not update the db-3* version. An 'S' instead of an 'U' seems like a good suggestion
Back to top
View user's profile Send private message
TGL
Bodhisattva
Bodhisattva


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

PostPosted: Sat Aug 23, 2003 4:02 pm    Post subject: Reply with quote

undeuxtroisout wrote:
Code:
[ebuild     U ] sys-libs/db-4.0.14-r2 [4.0.14-r1] +tcltk +java +doc
[ebuild     U ] sys-libs/db-3.2.9-r8 [3.2.9-r7] +doc

I vote for this output. That's exactly what I had in mine when I said "it would be better if there was no mention of the 2.1.4 version, like if two versions in differents slots were two different packages". And imho, following your example, but if their was no previous version of sys-libs/db-3.x installed, it should display:
Code:
[ebuild     U ] sys-libs/db-4.0.14-r2 [4.0.14-r1] +tcltk +java +doc
[ebuild  N    ] sys-libs/db-3.2.9-r8 +doc
That way, we would have:
- "N" <=> "one more package-version will be installed" (whereas we only have the left-right implication now)
- "U" <=> "an installed package-version will be replaced" (whereas we only have the right-left implication now)
- "D" <=> "...and this update is a downgrade" (which is already the case and is okay)

It would also be nice to explicitly give the slot number:
Code:
[ebuild     U ] sys-libs/db-4.0.14-r2 [4.0.14-r1] (slot=4) +tcltk +java +doc
[ebuild     U ] sys-libs/db-3.2.9-r8 [3.2.9-r7] (slot=3) +doc
Code:
[ebuild     U ] sys-libs/db-4.0.14-r2 [4.0.14-r1] (slot=4) +tcltk +java +doc
[ebuild  N    ] sys-libs/db-3.2.9-r8 (slot=3) +doc
Back to top
View user's profile Send private message
neysx
Retired Dev
Retired Dev


Joined: 27 Jan 2003
Posts: 795

PostPosted: Sat Aug 23, 2003 5:00 pm    Post subject: Reply with quote

I read the above mentioned bugzilla thread and I like the idea of giving the slot number with the following notation:
emerge db:3 db:4 db:4.1 e.g.

Of course the slot numbers have to be displayed. Read above.


Bonjour chez vous ;-)
Back to top
View user's profile Send private message
TGL
Bodhisattva
Bodhisattva


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

PostPosted: Mon Aug 25, 2003 10:26 pm    Post subject: Reply with quote

I've posted to bugzilla a patch which improves the "emerge -pv" output for slots. It allows what we have discussed above:
Code:
[ebuild     U ] sys-libs/db-4.0.14-r2 [4.0.14-r1] +tcltk +java +doc
[ebuild     U ] sys-libs/db-3.2.9-r8 [3.2.9-r7] +doc

But I've changed my mind about "upgrade to a new slot". In the case where db-4 is installed but not db-3, instead of a N as I have first suggested, the output will be:
Code:
[ebuild     US] sys-libs/db-3.2.9-r8 [4.0.14-r1]  +doc

This S means the update will go in a new slot. So, for the opposite situation, it will be:
Code:
[ebuild     US] sys-libs/db-4.0.14-r2 [3.2.9-r8] +tcltk +java +doc

This way the D is really, as already discussed, only displayed in case of a downgrade inside a slot:
Code:
[ebuild     UD] sys-libs/db-3.2.9-r7 [3.2.9-r8] +doc


The patch against portage-2.0.49 (or 2.0.49-r1, and probably most of the 2.0.49_preX) is available on bug #18608.
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