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: Sat, 09 May 2015 17:49:59
Message-Id: 554E48C2.1090403@gentoo.org
In Reply to: Re: [gentoo-portage-dev] repos.conf location w.r.t PORTAGE_CONFIGROOT by Joakim Tjernlund
1 On 05/09/2015 10:08 AM, Joakim Tjernlund wrote:
2 > On Sat, 2015-05-09 at 09:36 -0700, Zac Medico wrote:
3 >> On 05/09/2015 06:47 AM, Joakim Tjernlund wrote:
4 >>> On Fri, 2015-05-08 at 11:32 -0700, Zac Medico wrote:
5 >>>> On 05/07/2015 11:43 PM, Joakim Tjernlund wrote:
6 >>>>> On Thu, 2015-05-07 at 14:09 -0700, Zac Medico wrote:
7 >>>>>> On 05/07/2015 03:51 AM, Joakim Tjernlund wrote:
8 >>>>>>> On Wed, 2015-05-06 at 22:45 +0000, Joakim Tjernlund wrote:
9 >>>>>>>> On Wed, 2015-05-06 at 15:16 -0700, Zac Medico wrote:
10 >>>>>>>>> On 05/06/15 14:57, Joakim Tjernlund wrote:
11 >>>>>>>>>> On Wed, 2015-05-06 at 14:36 -0700, Zac Medico wrote:
12 >>>>>>>>>>> On 05/06/15 14:30, Joakim Tjernlund wrote:
13 >>>>>>>>>>>> On Wed, 2015-05-06 at 13:30 -0700, Zac Medico wrote:
14 >>>>>>>>>>>>> On 05/06/15 13:22, Joakim Tjernlund wrote:
15 >>>>>>>>>>>>>> On Wed, 2015-05-06 at 12:54 -0700, Zac Medico wrote:
16 >>>>>>>>>>>>> The idea is that you have separate repositories configured for each
17 >>>>>>>>>>>>> ROOT. If it's satisfying a build-time DEPEND that will be installed into
18 >>>>>>>>>>>>> ROOT=/, then it's supposed to use the repositories configured for ROOT=/.
19 >>>>>>>>>>>>
20 >>>>>>>>>>>> I see, but in my case I only install into my sysroot so I don't want this behaviour.
21 >>>>>>>>>>>
22 >>>>>>>>>>> So, why don't you use the --root-deps option?
23 >>>>>>>>>>
24 >>>>>>>>>> Just did(and --root-deps=rdeps too) and it didn't work, still wants to use
25 >>>>>>>>>> my newer hosts pkgs. :(
26 >>>>>>>>>
27 >>>>>>>>> It shouldn't do that. It sounds like maybe the [gentoo] config
28 >>>>>>>>> from/usr/share/portage/config/repos.conf is the source of your problems,
29 >>>>>>>>> since you $PORTAGE_CONFIGROOT config will always inherit that. Would
30 >>>>>>>>> that be consistent with your observations?
31 >>>>>>>>
32 >>>>>>>> Moving that file out of the way changed things, now I got I profile error:
33 >>>>>>>> !!! Unable to parse profile: '/etc/portage/make.profile'
34 >>>>>>>> !!! ParseError: Parent 'gentoo:default/linux/amd64/13.0' not found:
35 >>>>>>>> '/var/lib/layman/transmode/profiles/gentoo64-server/parent'
36 >>>>>>>> !!! Your current profile is invalid. If you have just changed your profile
37 >>>>>>>> !!! configuration, you should revert back to the previous configuration.
38 >>>>>>>> !!! Allowed actions are limited to --help, --info, --search, --sync, and
39 >>>>>>>> !!! --version.
40 >>>>>>>>
41 >>>>>>>> Which I think is a problem in my cross env.
42 >>>>>>>
43 >>>>>>> No, this is not it. Portage just bails when reading the host profile which it should not.
44 >>>>>>>
45 >>>>>>> Note: defining
46 >>>>>>> PORTAGE_REPOSITORIES=/my/own/repos.conf
47 >>>>>>> gives the same error.
48 >>>>>>>
49 >>>>>>
50 >>>>>> According to the error message, your transmode profile inherits a gentoo
51 >>>>>> profile, so you need the gentoo repository (at least the relevant profile).
52 >>>>>
53 >>>>> I have a my own profile in PORTAGE_CONFIGROOT which does not
54 >>>>> reference the host /etc/portage/make.profile at all so I think
55 >>>>> portage is using the wrong profile.
56 >>>>
57 >>>> When using ROOT=/foo, it always instantiates 2 profiles, and it uses one
58 >>>> profile for ROOT=/foo and the other profile for ROOT=/.
59 >>>
60 >>> This makes sense when just using ROOT, not when cross compiling.
61 >>> If I cross build (or use PORTAGE_REPOSITORIES ?) I don't think it makes
62 >>> sense to add the hosts profile as it has little to nothing to
63 >>> do with my cross target.
64 >>> How would a cross target use the hosts profile sensibly?
65 >>
66 >> The host profile is only used for packages installed to ROOT=/ in order
67 >> to satisfy DEPEND. If you use the emerge --root-deps then the host
68 >> profile is used for absolutely nothing (although it is still instantiated).
69 >
70 > I see, it would be nice if it wasn't instantiated when not needed so
71 > one could avoid the error I have seen.
72 >
73 >>
74 >>>>
75 >>>>> Futhermore, it does not understand the host profile, probably
76 >>>>> because my own PORTAGE_CONFIGROOT don't have profile-formats = portage-2
77 >>>>
78 >>>> You're saying this beciase of the above ParseError? I think maybe what
79 >>>> you want to do keep the default /usr/share/portage/config/repos.conf and
80 >>>> mask */*::gentoo in $PORTAGE_CONFIGROOT/etc/portage/package.mask.
81 >>>
82 >>> That is what I am doing now, but that still includes the hosts profile I think ?
83 >>
84 >> It will only be used for packages installed to ROOT=/ in order to
85 >> satisfy DEPEND, as I have mentioned above.
86 >
87 > OK, you always read the host profile in case you need it.
88 > May I suggest you avoid touching the host profile when it not used(cross complies)?
89
90 I suppose we could lazily instantiate the config for ROOT=/ at the point
91 where a a DEPEND needs to be satisfied (or HDEPEND for EAPI 5-hdepend).
92 See this bug:
93
94 https://bugs.gentoo.org/show_bug.cgi?id=324179
95 --
96 Thanks,
97 Zac

Replies

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