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: Fri, 23 Oct 2015 09:21:34
Message-Id: 1445592039.31293.138.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 Looking at that URL I wonder why not use ExtendedInterpolation ?
40 This would look like any other variable used in portage.
41
42 Jocke

Replies