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

Replies

Subject Author
Re: [gentoo-portage-dev] repos.conf location w.r.t PORTAGE_CONFIGROOT Joakim Tjernlund <joakim.tjernlund@×××××××××.se>
Re: [gentoo-portage-dev] repos.conf location w.r.t PORTAGE_CONFIGROOT Zac Medico <zmedico@g.o>