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: Sat, 09 May 2015 17:09:01
Message-Id: 1431191334.27859.265.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 09:36 -0700, Zac Medico wrote:
2 > On 05/09/2015 06:47 AM, Joakim Tjernlund wrote:
3 > > On Fri, 2015-05-08 at 11:32 -0700, Zac Medico wrote:
4 > > > On 05/07/2015 11:43 PM, Joakim Tjernlund wrote:
5 > > > > On Thu, 2015-05-07 at 14:09 -0700, Zac Medico wrote:
6 > > > > > On 05/07/2015 03:51 AM, Joakim Tjernlund wrote:
7 > > > > > > On Wed, 2015-05-06 at 22:45 +0000, Joakim Tjernlund wrote:
8 > > > > > > > On Wed, 2015-05-06 at 15:16 -0700, Zac Medico wrote:
9 > > > > > > > > On 05/06/15 14:57, Joakim Tjernlund wrote:
10 > > > > > > > > > On Wed, 2015-05-06 at 14:36 -0700, Zac Medico wrote:
11 > > > > > > > > > > On 05/06/15 14:30, Joakim Tjernlund wrote:
12 > > > > > > > > > > > On Wed, 2015-05-06 at 13:30 -0700, Zac Medico wrote:
13 > > > > > > > > > > > > On 05/06/15 13:22, Joakim Tjernlund wrote:
14 > > > > > > > > > > > > > On Wed, 2015-05-06 at 12:54 -0700, Zac Medico wrote:
15 > > > > > > > > > > > > > > On 05/06/15 12:41, Joakim Tjernlund wrote:
16 > > > > > > > > > > > > > > > On Wed, 2015-05-06 at 19:13 +0000, Joakim Tjernlund wrote:
17 > > > > > > > > > > > > > > > > On Wed, 2015-05-06 at 11:37 -0700, Zac Medico wrote:
18 > > > > > > > > > > > > > > > > > On 05/06/15 09:54, Joakim Tjernlund wrote:
19 > > > > > > > > > > > > > > > > > > I am trying to rebuild an old cross sysroot and I got problems.
20 > > > > > > > > > > > > > > > > > > I cannot make emerge to select my old ebuilds in an overlay over those
21 > > > > > > > > > > > > > > > > > > in /usr/portage.
22 > > > > > > > > > > > > > > > > > >
23 > > > > > > > > > > > > > > > > > > What new is since last time I did this is /etc/portage/repos.conf/
24 > > > > > > > > > > > > > > > > > > I suspect emerge always reads /etc/portage/repos.conf/ no matter
25 > > > > > > > > > > > > > > > > > > what I set PORTAGE_CONFIGROOT / ROOT to ?
26 > > > > > > > > > > > > > > > > > >
27 > > > > > > > > > > > > > > > > > > Jocke
28 > > > > > > > > > > > > > > > > > >
29 > > > > > > > > > > > > > > > > >
30 > > > > > > > > > > > > > > > > > It instantiates 2 config instances, one using /etc/portage/repos.conf
31 > > > > > > > > > > > > > > > > > (for build time DEPEND) and another one using
32 > > > > > > > > > > > > > > > > > $PORTAGE_CONFIGROOT/etc/portage/repos.conf (for run time {P,R}DEPEND).
33 > > > > > > > > > > > > > > > > > You can see that it's joined with PORTAGE_CONFIGROOT in the
34 > > > > > > > > > > > > > > > > > load_repository_config function:
35 > > > > > > > > > > > > > > > > >
36 > > > > > > > > > > > > > > > > > https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/repository/confi
37 > > > > > > > > > > > > > > > > > g.py
38 > > > > > > > > > > > > > > > > > ?id=
39 > > > > > > > > > > > > > > > > > 0f19
40 > > > > > > > > > > > > > > > > > 11
41 > > > > > > > > > > > > > > > > > 13cc
42 > > > > > > > > > > > > > > > > > cd04
43 > > > > > > > > > > > > > > > > > 9e11
44 > > > > > > > > > > > > > > > > > fdbe
45 > > > > > > > > > > > > > > > > > 73
46 > > > > > > > > > > > > > > > > > 493eb1efbf4bf89e#n971
47 > > > > > > > > > > > > > > > >
48 > > > > > > > > > > > > > > > > I see, doesn't this prevent exactly what I want to do?
49 > > > > > > > > > > > > > > > >
50 > > > > > > > > > > > > > > > > I can't see why this should be needed, it only creates a mess, another
51 > > > > > > > > > > > > > > > > example:
52 > > > > > > > > > > > > > > > > I tried to specify exact version of my old binutils and while that worked,
53 > > > > > > > > > > > > > > > > portage
54 > > > > > > > > > > > > > > > > wanted
55 > > > > > > > > > > > > > > > > to pull in a newer binutils-config from the hosts master gentoo repo and
56 > > > > > > > > > > > > > > > > thus the build failed.
57 > > > > > > > > > > > > > > > >
58 > > > > > > > > > > > > > > > > If a someone really wants this behaviour, he can just add the hosts master
59 > > > > > > > > > > > > > > > > repo
60 > > > > > > > > > > > > > > > > in his PORTAGE_CONFIGROOT IMHO
61 > > > > > > > > > > > > > > > >
62 > > > > > > > > > > > > > >
63 > > > > > > > > > > > > > > Maybe emerge --root-deps=rdeps is what you are looking for. This will
64 > > > > > > > > > > > > > > cause it to ignore DEPEND.
65 > > > > > > > > > > > > >
66 > > > > > > > > > > > > > That is not the same is it? if I "emerge ncurses" it will build ncurses but still
67 > > > > > > > > > > > > > take the ebuild from the hosts master since it is newer version.
68 > > > > > > > > > > > > >
69 > > > > > > > > > > > > > I realize now that I can change what repos are searched by using
70 > > > > > > > > > > > > > PORTAGE_REPOSITORIES=/my/own/repos.conf/
71 > > > > > > > > > > > > > but I still find the default behaviour very confusing and I don't see that it is
72 > > > > > > > > > > > > > useful.
73 > > > > > > > > > > > >
74 > > > > > > > > > > > > The idea is that you have separate repositories configured for each
75 > > > > > > > > > > > > ROOT. If it's satisfying a build-time DEPEND that will be installed into
76 > > > > > > > > > > > > ROOT=/, then it's supposed to use the repositories configured for ROOT=/.
77 > > > > > > > > > > >
78 > > > > > > > > > > > I see, but in my case I only install into my sysroot so I don't want this behaviour.
79 > > > > > > > > > >
80 > > > > > > > > > > So, why don't you use the --root-deps option?
81 > > > > > > > > >
82 > > > > > > > > > Just did(and --root-deps=rdeps too) and it didn't work, still wants to use
83 > > > > > > > > > my newer hosts pkgs. :(
84 > > > > > > > >
85 > > > > > > > > It shouldn't do that. It sounds like maybe the [gentoo] config
86 > > > > > > > > from/usr/share/portage/config/repos.conf is the source of your problems,
87 > > > > > > > > since you $PORTAGE_CONFIGROOT config will always inherit that. Would
88 > > > > > > > > that be consistent with your observations?
89 > > > > > > >
90 > > > > > > > Moving that file out of the way changed things, now I got I profile error:
91 > > > > > > > !!! Unable to parse profile: '/etc/portage/make.profile'
92 > > > > > > > !!! ParseError: Parent 'gentoo:default/linux/amd64/13.0' not found:
93 > > > > > > > '/var/lib/layman/transmode/profiles/gentoo64-server/parent'
94 > > > > > > > !!! Your current profile is invalid. If you have just changed your profile
95 > > > > > > > !!! configuration, you should revert back to the previous configuration.
96 > > > > > > > !!! Allowed actions are limited to --help, --info, --search, --sync, and
97 > > > > > > > !!! --version.
98 > > > > > > >
99 > > > > > > > Which I think is a problem in my cross env.
100 > > > > > >
101 > > > > > > No, this is not it. Portage just bails when reading the host profile which it should not.
102 > > > > > >
103 > > > > > > Note: defining
104 > > > > > > PORTAGE_REPOSITORIES=/my/own/repos.conf
105 > > > > > > gives the same error.
106 > > > > > >
107 > > > > >
108 > > > > > According to the error message, your transmode profile inherits a gentoo
109 > > > > > profile, so you need the gentoo repository (at least the relevant profile).
110 > > > >
111 > > > > I have a my own profile in PORTAGE_CONFIGROOT which does not
112 > > > > reference the host /etc/portage/make.profile at all so I think
113 > > > > portage is using the wrong profile.
114 > > >
115 > > > When using ROOT=/foo, it always instantiates 2 profiles, and it uses one
116 > > > profile for ROOT=/foo and the other profile for ROOT=/.
117 > >
118 > > This makes sense when just using ROOT, not when cross compiling.
119 > > If I cross build (or use PORTAGE_REPOSITORIES ?) I don't think it makes
120 > > sense to add the hosts profile as it has little to nothing to
121 > > do with my cross target.
122 > > How would a cross target use the hosts profile sensibly?
123 >
124 > The host profile is only used for packages installed to ROOT=/ in order
125 > to satisfy DEPEND. If you use the emerge --root-deps then the host
126 > profile is used for absolutely nothing (although it is still instantiated).
127
128 I see, it would be nice if it wasn't instantiated when not needed so
129 one could avoid the error I have seen.
130
131 >
132 > > >
133 > > > > Futhermore, it does not understand the host profile, probably
134 > > > > because my own PORTAGE_CONFIGROOT don't have profile-formats = portage-2
135 > > >
136 > > > You're saying this beciase of the above ParseError? I think maybe what
137 > > > you want to do keep the default /usr/share/portage/config/repos.conf and
138 > > > mask */*::gentoo in $PORTAGE_CONFIGROOT/etc/portage/package.mask.
139 > >
140 > > That is what I am doing now, but that still includes the hosts profile I think ?
141 >
142 > It will only be used for packages installed to ROOT=/ in order to
143 > satisfy DEPEND, as I have mentioned above.
144
145 OK, you always read the host profile in case you need it.
146 May I suggest you avoid touching the host profile when it not used(cross complies)?
147
148 Jocke

Replies