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: Wed, 06 May 2015 20:30:20
Message-Id: 554A79D3.1040001@gentoo.org
In Reply to: Re: [gentoo-portage-dev] repos.conf location w.r.t PORTAGE_CONFIGROOT by Joakim Tjernlund
1 On 05/06/15 13:22, Joakim Tjernlund wrote:
2 > On Wed, 2015-05-06 at 12:54 -0700, Zac Medico wrote:
3 >> On 05/06/15 12:41, Joakim Tjernlund wrote:
4 >>> On Wed, 2015-05-06 at 19:13 +0000, Joakim Tjernlund wrote:
5 >>>> On Wed, 2015-05-06 at 11:37 -0700, Zac Medico wrote:
6 >>>>> On 05/06/15 09:54, Joakim Tjernlund wrote:
7 >>>>>> I am trying to rebuild an old cross sysroot and I got problems.
8 >>>>>> I cannot make emerge to select my old ebuilds in an overlay over those
9 >>>>>> in /usr/portage.
10 >>>>>>
11 >>>>>> What new is since last time I did this is /etc/portage/repos.conf/
12 >>>>>> I suspect emerge always reads /etc/portage/repos.conf/ no matter
13 >>>>>> what I set PORTAGE_CONFIGROOT / ROOT to ?
14 >>>>>>
15 >>>>>> Jocke
16 >>>>>>
17 >>>>>
18 >>>>> It instantiates 2 config instances, one using /etc/portage/repos.conf
19 >>>>> (for build time DEPEND) and another one using
20 >>>>> $PORTAGE_CONFIGROOT/etc/portage/repos.conf (for run time {P,R}DEPEND).
21 >>>>> You can see that it's joined with PORTAGE_CONFIGROOT in the
22 >>>>> load_repository_config function:
23 >>>>>
24 >>>>> https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/repository/config.py?id=0f191113cccd049e11
25 >>>>> fdbe
26 >>>>> 73
27 >>>>> 493eb1efbf4bf89e#n971
28 >>>>
29 >>>> I see, doesn't this prevent exactly what I want to do?
30 >>>>
31 >>>> I can't see why this should be needed, it only creates a mess, another example:
32 >>>> I tried to specify exact version of my old binutils and while that worked, portage wanted
33 >>>> to pull in a newer binutils-config from the hosts master gentoo repo and
34 >>>> thus the build failed.
35 >>>>
36 >>>> If a someone really wants this behaviour, he can just add the hosts master repo
37 >>>> in his PORTAGE_CONFIGROOT IMHO
38 >>>>
39 >>
40 >> Maybe emerge --root-deps=rdeps is what you are looking for. This will
41 >> cause it to ignore DEPEND.
42 >
43 > That is not the same is it? if I "emerge ncurses" it will build ncurses but still
44 > take the ebuild from the hosts master since it is newer version.
45 >
46 > I realize now that I can change what repos are searched by using PORTAGE_REPOSITORIES=/my/own/repos.conf/
47 > but I still find the default behaviour very confusing and I don't see that it is useful.
48
49 The idea is that you have separate repositories configured for each
50 ROOT. If it's satisfying a build-time DEPEND that will be installed into
51 ROOT=/, then it's supposed to use the repositories configured for ROOT=/.
52
53 > What is 'extra_files' in load_repository_config()? Can I as a user add those or does portage
54 > add some of its own?
55
56 Currently, that argument is only used by repoman, since it uses a
57 StringIO instance to adjust the config there. Unless you are using the
58 python API directly, this functionality is currently not exposed to the
59 user.
60
61 >>
62 >>>
63 >>> Is there a way to make portage to prefer ebuilds from an overlay/other repo even if the master
64 >>> repo has newer versions?
65 >>>
66 >>> Jocke
67 >>>
68 >>
69 >> You can use repo atoms in /etc/portage/package.mask. For example,
70 >> 'sys-devel/binutils-config::gentoo', or '*/*::gentoo'.
71 >
72 > Nice! Can I also mask everything '*/*::gentoo' and then only unmask sys-devel/binutils-config::gentoo ?
73
74 Yes.
75 --
76 Thanks,
77 Zac

Replies

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