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

Replies