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: Sun, 10 May 2015 11:47:06
Message-Id: 1431258421.27859.271.camel@transmode.se
In Reply to: Re: [gentoo-portage-dev] repos.conf location w.r.t PORTAGE_CONFIGROOT by Zac Medico
1 On Sat, 2015-05-09 at 10:49 -0700, Zac Medico wrote:
2 > On 05/09/2015 10:08 AM, Joakim Tjernlund wrote:
3 > > On Sat, 2015-05-09 at 09:36 -0700, Zac Medico wrote:
4 > > > On 05/09/2015 06:47 AM, Joakim Tjernlund wrote:
5 > > > > On Fri, 2015-05-08 at 11:32 -0700, Zac Medico wrote:
6 > > > > > On 05/07/2015 11:43 PM, Joakim Tjernlund wrote:
7 > > > > > > On Thu, 2015-05-07 at 14:09 -0700, Zac Medico wrote:
8 > > > > > > > On 05/07/2015 03:51 AM, Joakim Tjernlund wrote:
9 > > > > > > > > On Wed, 2015-05-06 at 22:45 +0000, Joakim Tjernlund wrote:
10 > > > > > > > > > On Wed, 2015-05-06 at 15:16 -0700, Zac Medico wrote:
11 > > > > > > > > > > On 05/06/15 14:57, Joakim Tjernlund wrote:
12 > > > > > > > > > > > On Wed, 2015-05-06 at 14:36 -0700, Zac Medico wrote:
13 > > > > > > > > > > > > On 05/06/15 14:30, Joakim Tjernlund wrote:
14 > > > > > > > > > > > > > On Wed, 2015-05-06 at 13:30 -0700, Zac Medico wrote:
15 > > > > > > > > > > > > > > On 05/06/15 13:22, Joakim Tjernlund wrote:
16 > > > > > > > > > > > > > > > On Wed, 2015-05-06 at 12:54 -0700, Zac Medico wrote:
17 > > > > > > > > > > > > > > The idea is that you have separate repositories configured for each
18 > > > > > > > > > > > > > > ROOT. If it's satisfying a build-time DEPEND that will be installed into
19 > > > > > > > > > > > > > > ROOT=/, then it's supposed to use the repositories configured for ROOT=/.
20 > > > > > > > > > > > > >
21 > > > > > > > > > > > > > I see, but in my case I only install into my sysroot so I don't want this behaviour.
22 > > > > > > > > > > > >
23 > > > > > > > > > > > > So, why don't you use the --root-deps option?
24 > > > > > > > > > > >
25 > > > > > > > > > > > Just did(and --root-deps=rdeps too) and it didn't work, still wants to use
26 > > > > > > > > > > > my newer hosts pkgs. :(
27 > > > > > > > > > >
28 > > > > > > > > > > It shouldn't do that. It sounds like maybe the [gentoo] config
29 > > > > > > > > > > from/usr/share/portage/config/repos.conf is the source of your problems,
30 > > > > > > > > > > since you $PORTAGE_CONFIGROOT config will always inherit that. Would
31 > > > > > > > > > > that be consistent with your observations?
32 > > > > > > > > >
33 > > > > > > > > > Moving that file out of the way changed things, now I got I profile error:
34 > > > > > > > > > !!! Unable to parse profile: '/etc/portage/make.profile'
35 > > > > > > > > > !!! ParseError: Parent 'gentoo:default/linux/amd64/13.0' not found:
36 > > > > > > > > > '/var/lib/layman/transmode/profiles/gentoo64-server/parent'
37 > > > > > > > > > !!! Your current profile is invalid. If you have just changed your profile
38 > > > > > > > > > !!! configuration, you should revert back to the previous configuration.
39 > > > > > > > > > !!! Allowed actions are limited to --help, --info, --search, --sync, and
40 > > > > > > > > > !!! --version.
41 > > > > > > > > >
42 > > > > > > > > > Which I think is a problem in my cross env.
43 > > > > > > > >
44 > > > > > > > > No, this is not it. Portage just bails when reading the host profile which it should not.
45 > > > > > > > >
46 > > > > > > > > Note: defining
47 > > > > > > > > PORTAGE_REPOSITORIES=/my/own/repos.conf
48 > > > > > > > > gives the same error.
49 > > > > > > > >
50 > > > > > > >
51 > > > > > > > According to the error message, your transmode profile inherits a gentoo
52 > > > > > > > profile, so you need the gentoo repository (at least the relevant profile).
53 > > > > > >
54 > > > > > > I have a my own profile in PORTAGE_CONFIGROOT which does not
55 > > > > > > reference the host /etc/portage/make.profile at all so I think
56 > > > > > > portage is using the wrong profile.
57 > > > > >
58 > > > > > When using ROOT=/foo, it always instantiates 2 profiles, and it uses one
59 > > > > > profile for ROOT=/foo and the other profile for ROOT=/.
60 > > > >
61 > > > > This makes sense when just using ROOT, not when cross compiling.
62 > > > > If I cross build (or use PORTAGE_REPOSITORIES ?) I don't think it makes
63 > > > > sense to add the hosts profile as it has little to nothing to
64 > > > > do with my cross target.
65 > > > > How would a cross target use the hosts profile sensibly?
66 > > >
67 > > > The host profile is only used for packages installed to ROOT=/ in order
68 > > > to satisfy DEPEND. If you use the emerge --root-deps then the host
69 > > > profile is used for absolutely nothing (although it is still instantiated).
70 > >
71 > > I see, it would be nice if it wasn't instantiated when not needed so
72 > > one could avoid the error I have seen.
73 > >
74 > > >
75 > > > > >
76 > > > > > > Futhermore, it does not understand the host profile, probably
77 > > > > > > because my own PORTAGE_CONFIGROOT don't have profile-formats = portage-2
78 > > > > >
79 > > > > > You're saying this beciase of the above ParseError? I think maybe what
80 > > > > > you want to do keep the default /usr/share/portage/config/repos.conf and
81 > > > > > mask */*::gentoo in $PORTAGE_CONFIGROOT/etc/portage/package.mask.
82 > > > >
83 > > > > That is what I am doing now, but that still includes the hosts profile I think ?
84 > > >
85 > > > It will only be used for packages installed to ROOT=/ in order to
86 > > > satisfy DEPEND, as I have mentioned above.
87 > >
88 > > OK, you always read the host profile in case you need it.
89 > > May I suggest you avoid touching the host profile when it not used(cross complies)?
90 >
91 > I suppose we could lazily instantiate the config for ROOT=/ at the point
92 > where a a DEPEND needs to be satisfied (or HDEPEND for EAPI 5-hdepend).
93 > See this bug:
94 >
95 > https://bugs.gentoo.org/show_bug.cgi?id=324179
96
97 Right, seen that bug before :)
98
99 However, there may be a another bug in here. Portage is complaining over not being able
100 to load the hosts profile as the hosts is using "profile-formats = portage-2" and my
101 CONFIGROOT is not. I don't think my CONFIGROOT should be forced to use "profile-formats = portage-2"
102 just because the host is?
103
104 Jocke

Replies