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] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root
Date: Thu, 22 Oct 2015 19:16:33
Message-Id: 1445541324.31293.107.camel@transmode.se
In Reply to: Re: [gentoo-portage-dev] @sets and @profile does not work when ROOT=PORTAGE_CONFIGROOT=/my/new/root by Zac Medico
1 On Thu, 2015-10-22 at 11:54 -0700, Zac Medico wrote:
2 > On 10/22/2015 11:29 AM, Joakim Tjernlund wrote:
3 > > On Thu, 2015-10-22 at 08:54 -0700, Zac Medico wrote:
4 > > > On 10/22/2015 12:05 AM, Joakim Tjernlund wrote:
5 > > > > I don't use world_sets, I have in my profile(/my/new/root/usr/local/portage/tmv3-target-overlay):
6 > > > > # > cat sets.conf
7 > > > > [CUSFPv3 sets]
8 > > > > class = portage.sets.files.StaticFileSet
9 > > > > multiset = true
10 > > > > directory = ${repository:tmv3-target-overlay}/sets/
11 > > > >
12 > > > > [world]
13 > > > > class = portage.sets.base.DummyPackageSet
14 > > > > packages = @cusfpv3 @profile @selected @system
15 > > > >
16 > > > > and in sets/:
17 > > > > # > cat sets/cusfpv3
18 > > > > net-ftp/ftp
19 > > > > net-ftp/tftp-hpa
20 > > > > net-ftp/vsftpd
21 > > > > ....
22 > > > >
23 > > > > and now it hits me, this line:
24 > > > > directory = ${repository:tmv3-target-overlay}/sets/
25 > > > > does it always refer too ROOT=/ ?
26 > > >
27 > > > You need to use %(ROOT)s${repository:tmv3-target-overlay}/sets to
28 > > > substitute $ROOT into the set configuration. For example, the default
29 > > > set configuration located at /usr/share/portage/config/sets/portage.conf
30 > > > does something similar with %(PORTAGE_CONFIGROOT)s.
31 > >
32 > > Nice! I am a bit puzzled over the trailing s in ..)s, is that a typo? if not
33 > > what does it mean?
34 >
35 > The trailing s is required. It's python configparser interpolation syntax:
36 >
37 > https://docs.python.org/3/library/configparser.html#interpolation-of-values
38 >
39 > > Can I use %(PORTAGE_CONFIGROOT) in repos.conf too? or is it not needed?
40 >
41 > Yes you can use it (but you need the trailing s). It's needed for any
42 > absolute paths that refer to /etc/portage.
43
44 hmm, not /etc/portage but /usr/portage:
45 [gentoo]
46 location = %(PORTAGE_CONFIGROOT)s/usr/portage
47
48 but then portage throws:
49 emerge -aNDuv world
50 !!! Error while reading repo config file: Bad value substitution:
51 section: [gentoo]
52 option : location
53 key : portage_configroot
54 rawval : /usr/portage
55
56 !!! Unable to parse profile: '/etc/portage/make.profile'
57 !!! ParseError: Parent 'gentoo:default/linux/powerpc/ppc32/13.0' not found: '/usr/local/portage/tmv3-target
58 -overlay/profiles/cusfpv3/parent'

Replies