Mark Knecht schreef:
> Hi,
> I wonder what the explanation in the emerge man page about the
> --update option really means. What is meant by, and how does emerge
> pick, "the best version available"?
>
> - Mark
>
For those wondering, here's the quote:
--update (-u)
Updates packages to the best version available, which may
not always be the highest version number due to masking for testing and
development. This will also update direct dependencies which may not
be what you want. In general, use this option only in combination with
the world or system target.
I accept that this is somewhat unclear, but to explain it fully would
take more space than a man page really is for.
But anyway, the 'best' version available is mostly determined by the
arch masks, which are determined by the developers.
"Best" in this case is a somewhat poor choice of words, but at least
indicates the subjectiveness of the determination.
In any case, a few examples:
media-video/mplayer
Available versions: 1.0_pre6-r4 1.0_pre6-r5 1.0_pre6-r6 1.0_pre7
Installed: 1.0_pre7
Homepage: http://www.mplayerhq.hu/
Description: Media Player for Linux
All available versions of mplayer are stable, so the 'best' version is
the most recent stable.
media-libs/xine-lib
Available versions: ~1_rc6-r2 1_rc8-r1 1.0-r2 1.0.1-r3 ~1.0.2
~1.1.0 ~1.1.0-r1
Installed: 1.0.1-r3
Homepage: http://xine.sourceforge.net/
Description: Core libraries for Xine movie player
in this case, if one was using stable arch, and had not activated
unstable for this package (as I haven't), the best version is the most
recent stable (1.0.1-r3), which is not the most recent version.
However, if one was using ~arch, or had activated unstable for this
package in /etc/portage/package.mask, then the 'best' version would be
1.1.0-r1, which is the most recent revision, but not in stable Portage.
media-video/ati-drivers
Available versions: 8.8.25-r3 8.10.19 8.12.10 [M]8.13.3 [M]8.13.4
8.14.13 8.14.13-r1 8.14.13-r2 [M]8.14.13-r3 *8.16.20
Installed: 8.14.13-r2
Homepage: http://www.ati.com
Description: Ati precompiled drivers for r350, r300, r250
and r200 chipsets
Now in this case, the 'best' version is the most recent stable. The
second most recent version (8.14.13-r3) is hard masked, but if I
unmasked it with /etc/portage/package.unmask (and possibly also
/etc/portage/package.keywords), then Portage would consider it the
'best', insofar as it would attempt to install it if I upgraded the
drivers. Of course, the very fact that you have to manually unmask the
packages should give you pause as to whether you really want to consider
this the 'best' for you.
The very most recent version (8.16.20) is 'not available' -- meaning
that it will never be considered the 'best' version until it returns to
Portage; masking or unmasking is of no use here. I know, because I had
unmasked and installed the latest drivers, which did not work well, to
put it mildly, and today I synced and Portage downgraded them. I would
have downgraded them manually anyway, but it was interesting to see
Portage downgrade them by force despite the fact that they were still
unmasked. They have so many problems that they are no longer on the
Portage radar until the issues are determined to at least an extent that
someone knows what to fix, and who has to fix it (Gentoo, the kernel
guys if it's a kernel conflict, ATI).
So, 'best' is a matter of judgement, and basically Gentoo sorts packages
into categories so that you can have some context to make the judgement
about what is best *for you*. If stable is best for you, then Portage
will choose the stable packages (because you told it to). If unstable is
best for you, then Portage will choose the unstable packages (because
you told it to). If stable is generally best, but in some specific
cases, unstable is best for you, then Portage will choose the stable
packages except where you told it that unstable is OK.
That's how it's done, mostly.
HTH,
Holly
--
[email protected] mailing list