Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] where are the version numbers of a profile stored?
Date: Sun, 07 Jun 2020 18:22:58
Message-Id: CAGfcS_=rnVNLYRM9E1rbRt=i4sC_ciDP_fTOu4XFmm+iGGDfQQ@mail.gmail.com
In Reply to: [gentoo-user] where are the version numbers of a profile stored? by n952162
1 On Sun, Jun 7, 2020 at 1:31 PM n952162 <n952162@×××.de> wrote:
2 >
3 > When I do an emerge --sync, various ebuilds are loaded onto my system,
4 > co-existing with other ebuilds, possibly from the same package. What
5 > determines which package version is to be used?
6 >
7 > I assumed this was specified by the profile (e.g. 17.1), but I can't
8 > find any version numbers in /etc/portage/make.profile/
9 >
10
11 The process is exclusionary, not inclusionary, for the most part,
12 which is why the profiles tend to be simple and not list a lot of
13 packages or versions.
14
15 Portage installs the highest version of a package which is not blocked
16 for some reason, unless you explicitly tell it to install a particular
17 version of a package (which still will only install if not blocked for
18 some reason).
19
20 So, if you type:
21 emerge '=app-shells/bash-5.0_p11'
22
23 Then portage will install that version of bash if it is not blocked
24 for some reason.
25
26 If you type:
27 emerge app-shells/bash
28
29 Then portage will install the latest version of bash that is not
30 blocked for some reason.
31
32 The same applies to dependencies pulled in by packages - if a
33 particular version is pulled in then that version will be installed if
34 possible. If a dependency is mentioned then the latest allowable
35 version will be installed. The dependency can also include version
36 restrictions in which case the latest version allowed with the
37 additional restrictions will be installed. I'll leave out USE
38 dependencies, which impose more rules.
39
40 So, at that point the only thing that matters is the various
41 mechanisms that block package versions from installing: masks and
42 keywords.
43
44 Keywords: A package version can only be installed if it contains an
45 accepted keyword. Keywords can be accepted by your profile or by your
46 make.conf. Eg, ~amd64 or amd64. If the package does not declare any
47 keyword that you are accepting, then it will not be used. This is the
48 main mechanism used to determine what version you will get. Packages
49 are keyworded based on whether they work (~arch) or are considered
50 stable (arch) on a particular architecture.
51
52 Masks: A package version cannot be installed if it is masked. This
53 can be set in /etc/portage/package.mask, or by a profile. Masks are
54 used for a lot of reasons - sometimes to stage package versions for
55 broader testing before being released, and sometimes because they
56 don't work well in a particular profile, and often for security
57 concerns or as a prelude to removal.
58
59 If you post a specific example I can explain what version will be
60 installed, assuming you don't have any dependencies with version
61 restrictions, and you will need to tell me what your ACCEPT_KEYWORDS
62 and profile are set to.
63
64 --
65 Rich

Replies