Gentoo Archives: gentoo-portage-dev

From: Joakim Tjernlund <joakim.tjernlund@×××××××××.se>
To: "gentoo-portage-dev@l.g.o" <gentoo-portage-dev@l.g.o>
Subject: Re: [gentoo-portage-dev] repos.conf location w.r.t PORTAGE_CONFIGROOT
Date: Fri, 08 May 2015 06:43:50
Message-Id: 1431067426.27859.196.camel@transmode.se
In Reply to: Re: [gentoo-portage-dev] repos.conf location w.r.t PORTAGE_CONFIGROOT by Zac Medico
1 On Thu, 2015-05-07 at 14:09 -0700, Zac Medico wrote:
2 > On 05/07/2015 03:51 AM, Joakim Tjernlund wrote:
3 > > On Wed, 2015-05-06 at 22:45 +0000, Joakim Tjernlund wrote:
4 > > > On Wed, 2015-05-06 at 15:16 -0700, Zac Medico wrote:
5 > > > > On 05/06/15 14:57, Joakim Tjernlund wrote:
6 > > > > > On Wed, 2015-05-06 at 14:36 -0700, Zac Medico wrote:
7 > > > > > > On 05/06/15 14:30, Joakim Tjernlund wrote:
8 > > > > > > > On Wed, 2015-05-06 at 13:30 -0700, Zac Medico wrote:
9 > > > > > > > > On 05/06/15 13:22, Joakim Tjernlund wrote:
10 > > > > > > > > > On Wed, 2015-05-06 at 12:54 -0700, Zac Medico wrote:
11 > > > > > > > > > > On 05/06/15 12:41, Joakim Tjernlund wrote:
12 > > > > > > > > > > > On Wed, 2015-05-06 at 19:13 +0000, Joakim Tjernlund wrote:
13 > > > > > > > > > > > > On Wed, 2015-05-06 at 11:37 -0700, Zac Medico wrote:
14 > > > > > > > > > > > > > On 05/06/15 09:54, Joakim Tjernlund wrote:
15 > > > > > > > > > > > > > > I am trying to rebuild an old cross sysroot and I got problems.
16 > > > > > > > > > > > > > > I cannot make emerge to select my old ebuilds in an overlay over those
17 > > > > > > > > > > > > > > in /usr/portage.
18 > > > > > > > > > > > > > >
19 > > > > > > > > > > > > > > What new is since last time I did this is /etc/portage/repos.conf/
20 > > > > > > > > > > > > > > I suspect emerge always reads /etc/portage/repos.conf/ no matter
21 > > > > > > > > > > > > > > what I set PORTAGE_CONFIGROOT / ROOT to ?
22 > > > > > > > > > > > > > >
23 > > > > > > > > > > > > > > Jocke
24 > > > > > > > > > > > > > >
25 > > > > > > > > > > > > >
26 > > > > > > > > > > > > > It instantiates 2 config instances, one using /etc/portage/repos.conf
27 > > > > > > > > > > > > > (for build time DEPEND) and another one using
28 > > > > > > > > > > > > > $PORTAGE_CONFIGROOT/etc/portage/repos.conf (for run time {P,R}DEPEND).
29 > > > > > > > > > > > > > You can see that it's joined with PORTAGE_CONFIGROOT in the
30 > > > > > > > > > > > > > load_repository_config function:
31 > > > > > > > > > > > > >
32 > > > > > > > > > > > > > https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/repository/config.py?id=
33 > > > > > > > > > > > > > 0f19
34 > > > > > > > > > > > > > 11
35 > > > > > > > > > > > > > 13cc
36 > > > > > > > > > > > > > cd04
37 > > > > > > > > > > > > > 9e11
38 > > > > > > > > > > > > > fdbe
39 > > > > > > > > > > > > > 73
40 > > > > > > > > > > > > > 493eb1efbf4bf89e#n971
41 > > > > > > > > > > > >
42 > > > > > > > > > > > > I see, doesn't this prevent exactly what I want to do?
43 > > > > > > > > > > > >
44 > > > > > > > > > > > > I can't see why this should be needed, it only creates a mess, another example:
45 > > > > > > > > > > > > I tried to specify exact version of my old binutils and while that worked, portage
46 > > > > > > > > > > > > wanted
47 > > > > > > > > > > > > to pull in a newer binutils-config from the hosts master gentoo repo and
48 > > > > > > > > > > > > thus the build failed.
49 > > > > > > > > > > > >
50 > > > > > > > > > > > > If a someone really wants this behaviour, he can just add the hosts master repo
51 > > > > > > > > > > > > in his PORTAGE_CONFIGROOT IMHO
52 > > > > > > > > > > > >
53 > > > > > > > > > >
54 > > > > > > > > > > Maybe emerge --root-deps=rdeps is what you are looking for. This will
55 > > > > > > > > > > cause it to ignore DEPEND.
56 > > > > > > > > >
57 > > > > > > > > > That is not the same is it? if I "emerge ncurses" it will build ncurses but still
58 > > > > > > > > > take the ebuild from the hosts master since it is newer version.
59 > > > > > > > > >
60 > > > > > > > > > I realize now that I can change what repos are searched by using
61 > > > > > > > > > PORTAGE_REPOSITORIES=/my/own/repos.conf/
62 > > > > > > > > > but I still find the default behaviour very confusing and I don't see that it is useful.
63 > > > > > > > >
64 > > > > > > > > The idea is that you have separate repositories configured for each
65 > > > > > > > > ROOT. If it's satisfying a build-time DEPEND that will be installed into
66 > > > > > > > > ROOT=/, then it's supposed to use the repositories configured for ROOT=/.
67 > > > > > > >
68 > > > > > > > I see, but in my case I only install into my sysroot so I don't want this behaviour.
69 > > > > > >
70 > > > > > > So, why don't you use the --root-deps option?
71 > > > > >
72 > > > > > Just did(and --root-deps=rdeps too) and it didn't work, still wants to use
73 > > > > > my newer hosts pkgs. :(
74 > > > >
75 > > > > It shouldn't do that. It sounds like maybe the [gentoo] config
76 > > > > from/usr/share/portage/config/repos.conf is the source of your problems,
77 > > > > since you $PORTAGE_CONFIGROOT config will always inherit that. Would
78 > > > > that be consistent with your observations?
79 > > >
80 > > > Moving that file out of the way changed things, now I got I profile error:
81 > > > !!! Unable to parse profile: '/etc/portage/make.profile'
82 > > > !!! ParseError: Parent 'gentoo:default/linux/amd64/13.0' not found:
83 > > > '/var/lib/layman/transmode/profiles/gentoo64-server/parent'
84 > > > !!! Your current profile is invalid. If you have just changed your profile
85 > > > !!! configuration, you should revert back to the previous configuration.
86 > > > !!! Allowed actions are limited to --help, --info, --search, --sync, and
87 > > > !!! --version.
88 > > >
89 > > > Which I think is a problem in my cross env.
90 > >
91 > > No, this is not it. Portage just bails when reading the host profile which it should not.
92 > >
93 > > Note: defining
94 > > PORTAGE_REPOSITORIES=/my/own/repos.conf
95 > > gives the same error.
96 > >
97 >
98 > According to the error message, your transmode profile inherits a gentoo
99 > profile, so you need the gentoo repository (at least the relevant profile).
100
101 I have a my own profile in PORTAGE_CONFIGROOT which does not
102 reference the host /etc/portage/make.profile at all so I think
103 portage is using the wrong profile.
104
105 Futhermore, it does not understand the host profile, probably
106 because my own PORTAGE_CONFIGROOT don't have profile-formats = portage-2
107
108 Jocke

Replies