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: Wed, 06 May 2015 21:30:29
Message-Id: 1430947825.27859.135.camel@transmode.se
In Reply to: Re: [gentoo-portage-dev] repos.conf location w.r.t PORTAGE_CONFIGROOT by Zac Medico
1 On Wed, 2015-05-06 at 13:30 -0700, Zac Medico wrote:
2 > On 05/06/15 13:22, Joakim Tjernlund wrote:
3 > > On Wed, 2015-05-06 at 12:54 -0700, Zac Medico wrote:
4 > > > On 05/06/15 12:41, Joakim Tjernlund wrote:
5 > > > > On Wed, 2015-05-06 at 19:13 +0000, Joakim Tjernlund wrote:
6 > > > > > On Wed, 2015-05-06 at 11:37 -0700, Zac Medico wrote:
7 > > > > > > On 05/06/15 09:54, Joakim Tjernlund wrote:
8 > > > > > > > I am trying to rebuild an old cross sysroot and I got problems.
9 > > > > > > > I cannot make emerge to select my old ebuilds in an overlay over those
10 > > > > > > > in /usr/portage.
11 > > > > > > >
12 > > > > > > > What new is since last time I did this is /etc/portage/repos.conf/
13 > > > > > > > I suspect emerge always reads /etc/portage/repos.conf/ no matter
14 > > > > > > > what I set PORTAGE_CONFIGROOT / ROOT to ?
15 > > > > > > >
16 > > > > > > > Jocke
17 > > > > > > >
18 > > > > > >
19 > > > > > > It instantiates 2 config instances, one using /etc/portage/repos.conf
20 > > > > > > (for build time DEPEND) and another one using
21 > > > > > > $PORTAGE_CONFIGROOT/etc/portage/repos.conf (for run time {P,R}DEPEND).
22 > > > > > > You can see that it's joined with PORTAGE_CONFIGROOT in the
23 > > > > > > load_repository_config function:
24 > > > > > >
25 > > > > > > https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/repository/config.py?id=0f191113cccd04
26 > > > > > > 9e11
27 > > > > > > fdbe
28 > > > > > > 73
29 > > > > > > 493eb1efbf4bf89e#n971
30 > > > > >
31 > > > > > I see, doesn't this prevent exactly what I want to do?
32 > > > > >
33 > > > > > I can't see why this should be needed, it only creates a mess, another example:
34 > > > > > I tried to specify exact version of my old binutils and while that worked, portage wanted
35 > > > > > to pull in a newer binutils-config from the hosts master gentoo repo and
36 > > > > > thus the build failed.
37 > > > > >
38 > > > > > If a someone really wants this behaviour, he can just add the hosts master repo
39 > > > > > in his PORTAGE_CONFIGROOT IMHO
40 > > > > >
41 > > >
42 > > > Maybe emerge --root-deps=rdeps is what you are looking for. This will
43 > > > cause it to ignore DEPEND.
44 > >
45 > > That is not the same is it? if I "emerge ncurses" it will build ncurses but still
46 > > take the ebuild from the hosts master since it is newer version.
47 > >
48 > > I realize now that I can change what repos are searched by using PORTAGE_REPOSITORIES=/my/own/repos.conf/
49 > > but I still find the default behaviour very confusing and I don't see that it is useful.
50 >
51 > The idea is that you have separate repositories configured for each
52 > ROOT. If it's satisfying a build-time DEPEND that will be installed into
53 > ROOT=/, then it's supposed to use the repositories configured for ROOT=/.
54
55 I see, but in my case I only install into my sysroot so I don't want this behaviour.
56
57 Can you not add a test for CHOST/CBULID/CTARGET (never remeber which is which) so portage
58 only adds the hosts repo if they are the same?
59 Basically only add the master repo if not cross-building?
60
61 Jocke

Replies