Gentoo Archives: gentoo-portage-dev

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

Replies

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